Lines Matching refs:decryptreadbuf
111 /* If we don't have the length of decryptreadbuf, we didn't read
113 if (ses.decryptreadbuf->len == 0) {
165 dropbear_assert(ses.decryptreadbuf == NULL);
166 ses.decryptreadbuf = buf_new(blocksize);
197 memcpy(buf_getwriteptr(ses.decryptreadbuf, blocksize),
203 buf_getwriteptr(ses.decryptreadbuf,blocksize),
209 buf_setlen(ses.decryptreadbuf, blocksize);
210 len = buf_getint(ses.decryptreadbuf) + 4 + macsize;
243 buf_resize(ses.decryptreadbuf, ses.readbuf->len - macsize);
244 buf_setlen(ses.decryptreadbuf, ses.decryptreadbuf->size);
245 buf_setpos(ses.decryptreadbuf, blocksize);
251 memcpy(buf_getwriteptr(ses.decryptreadbuf, len),
257 buf_getwriteptr(ses.decryptreadbuf, blocksize),
263 buf_incrwritepos(ses.decryptreadbuf, blocksize);
269 if (checkmac(ses.readbuf, ses.decryptreadbuf) != DROPBEAR_SUCCESS) {
278 buf_setpos(ses.decryptreadbuf, PACKET_PADDING_OFF);
279 padlen = buf_getbyte(ses.decryptreadbuf);
283 len = ses.decryptreadbuf->len - padlen - 4 - 1;
288 buf_setpos(ses.decryptreadbuf, PACKET_PAYLOAD_OFF);
293 ses.payload = buf_decompress(ses.decryptreadbuf, len);
300 memcpy(ses.payload->data, buf_getptr(ses.decryptreadbuf, len), len);
304 buf_free(ses.decryptreadbuf);
305 ses.decryptreadbuf = NULL;