Lines Matching refs:rr

553 int ssl_release_record(SSL_CONNECTION *s, TLS_RECORD *rr, size_t length)  in ssl_release_record()  argument
555 assert(rr->length >= length); in ssl_release_record()
556 if (rr->rechandle != NULL) { in ssl_release_record()
558 length = rr->length; in ssl_release_record()
562 rr->rechandle, in ssl_release_record()
568 if (length == rr->length) in ssl_release_record()
570 } else if (length == 0 || length == rr->length) { in ssl_release_record()
572 OPENSSL_free(rr->allocdata); in ssl_release_record()
573 rr->allocdata = NULL; in ssl_release_record()
575 rr->length -= length; in ssl_release_record()
576 if (rr->length > 0) in ssl_release_record()
577 rr->off += length; in ssl_release_record()
579 rr->off = 0; in ssl_release_record()
620 TLS_RECORD *rr; in ssl3_read_bytes() local
688 rr = &s->rlayer.tlsrecs[s->rlayer.num_recs]; in ssl3_read_bytes()
692 &rr->rechandle, in ssl3_read_bytes()
693 &rr->version, &rr->type, in ssl3_read_bytes()
694 &rr->data, &rr->length, in ssl3_read_bytes()
700 rr->off = 0; in ssl3_read_bytes()
705 rr = &s->rlayer.tlsrecs[s->rlayer.curr_rec]; in ssl3_read_bytes()
708 && rr->type != SSL3_RT_HANDSHAKE in ssl3_read_bytes()
719 if (rr->type != SSL3_RT_ALERT && rr->length != 0) in ssl3_read_bytes()
726 && (rr->type != SSL3_RT_HANDSHAKE)) { in ssl3_read_bytes()
742 if (type == rr->type in ssl3_read_bytes()
743 || (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC in ssl3_read_bytes()
762 && rr->type == SSL3_RT_CHANGE_CIPHER_SPEC in ssl3_read_bytes()
769 *recvd_type = rr->type; in ssl3_read_bytes()
777 if (rr->length == 0 && !ssl_release_record(s, rr, 0)) in ssl3_read_bytes()
786 if (len - totalbytes > rr->length) in ssl3_read_bytes()
787 n = rr->length; in ssl3_read_bytes()
791 memcpy(buf, &(rr->data[rr->off]), n); in ssl3_read_bytes()
795 if (rr->length == 0 && !ssl_release_record(s, rr, 0)) in ssl3_read_bytes()
798 if (!ssl_release_record(s, rr, n)) in ssl3_read_bytes()
801 if (rr->length == 0 in ssl3_read_bytes()
802 || (peek && n == rr->length)) { in ssl3_read_bytes()
803 rr++; in ssl3_read_bytes()
827 if (rr->version == SSL2_VERSION) { in ssl3_read_bytes()
839 && (s->server || rr->type != SSL3_RT_ALERT)) { in ssl3_read_bytes()
846 s->version = rr->version; in ssl3_read_bytes()
856 if (rr->type == SSL3_RT_ALERT) { in ssl3_read_bytes()
858 const unsigned char *alert_bytes = rr->data + rr->off; in ssl3_read_bytes()
861 if (!PACKET_buf_init(&alert, alert_bytes, rr->length) in ssl3_read_bytes()
886 if (!ssl_release_record(s, rr, 0)) in ssl3_read_bytes()
914 if (!ssl_release_record(s, rr, 0)) in ssl3_read_bytes()
939 if (rr->type == SSL3_RT_HANDSHAKE) { in ssl3_read_bytes()
950 if (!ssl_release_record(s, rr, 0)) in ssl3_read_bytes()
970 if (!ssl_release_record(s, rr, 0)) in ssl3_read_bytes()
984 if (rr->type == SSL3_RT_HANDSHAKE) { in ssl3_read_bytes()
990 if (rr->length < n) in ssl3_read_bytes()
991 n = rr->length; /* available bytes */ in ssl3_read_bytes()
995 memcpy(dest + *dest_len, rr->data + rr->off, n); in ssl3_read_bytes()
1002 if ((n > 0 || rr->length == 0) && !ssl_release_record(s, rr, n)) in ssl3_read_bytes()
1009 if (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC) { in ssl3_read_bytes()
1060 switch (rr->type) { in ssl3_read_bytes()
1102 if (!ossl_early_data_count_ok(s, rr->length, in ssl3_read_bytes()
1107 if (!ssl_release_record(s, rr, 0)) in ssl3_read_bytes()