Lines Matching refs:rr
83 static DTLS_BITMAP *dtls_get_bitmap(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *rr, in dtls_get_bitmap() argument
89 if (rr->epoch == rl->epoch) in dtls_get_bitmap()
95 else if (rr->epoch == rl->epoch + 1) { in dtls_get_bitmap()
112 TLS_RL_RECORD *rr; in dtls_process_record() local
119 rr = &rl->rrec[0]; in dtls_process_record()
125 rr->input = &(rl->packet[DTLS1_RT_HEADER_LENGTH]); in dtls_process_record()
140 if (rr->length > SSL3_RT_MAX_ENCRYPTED_LENGTH) { in dtls_process_record()
146 rr->data = rr->input; in dtls_process_record()
147 rr->orig_len = rr->length; in dtls_process_record()
165 if (rr->orig_len < mac_size) { in dtls_process_record()
169 rr->length -= mac_size; in dtls_process_record()
170 mac = rr->data + rr->length; in dtls_process_record()
171 i = rl->funcs->mac(rl, rr, md, 0 /* not send */); in dtls_process_record()
190 enc_err = rl->funcs->cipher(rl, rr, 1, 0, &macbuf, mac_size); in dtls_process_record()
205 rr->length = 0; in dtls_process_record()
211 BIO_printf(trc_out, "dec %zd\n", rr->length); in dtls_process_record()
212 BIO_dump_indent(trc_out, rr->data, rr->length, 4); in dtls_process_record()
221 i = rl->funcs->mac(rl, rr, md, 0 /* not send */); in dtls_process_record()
225 if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH + mac_size) in dtls_process_record()
231 rr->length = 0; in dtls_process_record()
238 if (rr->length > SSL3_RT_MAX_COMPRESSED_LENGTH) { in dtls_process_record()
243 if (!tls_do_uncompress(rl, rr)) { in dtls_process_record()
253 if (rr->length > rl->max_frag_len) { in dtls_process_record()
258 rr->off = 0; in dtls_process_record()
382 TLS_RL_RECORD *rr; in dtls_get_more_records() local
391 rr = rl->rrec; in dtls_get_more_records()
431 rr->type = *(p++); in dtls_get_more_records()
434 rr->rec_version = (ssl_major << 8) | ssl_minor; in dtls_get_more_records()
437 n2s(p, rr->epoch); in dtls_get_more_records()
442 n2s(p, rr->length); in dtls_get_more_records()
445 rl->msg_callback(0, rr->rec_version, SSL3_RT_HEADER, rl->packet, DTLS1_RT_HEADER_LENGTH, in dtls_get_more_records()
452 if (!rl->is_first_record && rr->type != SSL3_RT_ALERT) { in dtls_get_more_records()
453 if (rr->rec_version != rl->version) { in dtls_get_more_records()
455 rr->length = 0; in dtls_get_more_records()
465 rr->length = 0; in dtls_get_more_records()
470 if (rr->length > SSL3_RT_MAX_ENCRYPTED_LENGTH) { in dtls_get_more_records()
472 rr->length = 0; in dtls_get_more_records()
481 if (rr->length > rl->max_frag_len + SSL3_RT_MAX_ENCRYPTED_OVERHEAD) { in dtls_get_more_records()
483 rr->length = 0; in dtls_get_more_records()
493 if (rr->length > rl->packet_length - DTLS1_RT_HEADER_LENGTH) { in dtls_get_more_records()
495 more = rr->length; in dtls_get_more_records()
503 rr->length = 0; in dtls_get_more_records()
517 bitmap = dtls_get_bitmap(rl, rr, &is_next_epoch); in dtls_get_more_records()
519 rr->length = 0; in dtls_get_more_records()
529 rr->length = 0; in dtls_get_more_records()
538 if (rr->length == 0) in dtls_get_more_records()
549 rr->seq_num) < 0) { in dtls_get_more_records()
554 rr->length = 0; in dtls_get_more_records()
564 rr->length = 0; in dtls_get_more_records()
569 if (rl->funcs->post_process_record && !rl->funcs->post_process_record(rl, rr)) { in dtls_get_more_records()