Lines Matching refs:rl
17 static int tls_any_set_crypto_state(OSSL_RECORD_LAYER *rl, int level, in tls_any_set_crypto_state() argument
37 static int tls_any_cipher(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *recs, in tls_any_cipher() argument
44 static int tls_validate_record_header(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *rec) in tls_validate_record_header() argument
48 if (!ossl_assert(rl->version == TLS_ANY_VERSION)) { in tls_validate_record_header()
49 RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in tls_validate_record_header()
53 RLAYERfatal(rl, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_TOO_SHORT); in tls_validate_record_header()
57 if (rl->version == TLS_ANY_VERSION) { in tls_validate_record_header()
59 if (rl->is_first_record) { in tls_validate_record_header()
66 p = rl->packet; in tls_validate_record_header()
71 RLAYERfatal(rl, SSL_AD_NO_ALERT, SSL_R_HTTP_REQUEST); in tls_validate_record_header()
74 RLAYERfatal(rl, SSL_AD_NO_ALERT, in tls_validate_record_header()
80 RLAYERfatal(rl, SSL_AD_NO_ALERT, in tls_validate_record_header()
84 RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION, in tls_validate_record_header()
89 } else if (rl->version == TLS1_3_VERSION) { in tls_validate_record_header()
95 } else if (rec->rec_version != rl->version) { in tls_validate_record_header()
96 if ((rl->version & 0xFF00) == (rec->rec_version & 0xFF00)) { in tls_validate_record_header()
106 RLAYERfatal(rl, SSL_AD_NO_ALERT, in tls_validate_record_header()
111 rl->version = (unsigned short)rec->rec_version; in tls_validate_record_header()
113 RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION, in tls_validate_record_header()
124 RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG); in tls_validate_record_header()
130 static int tls_any_set_protocol_version(OSSL_RECORD_LAYER *rl, int vers) in tls_any_set_protocol_version() argument
132 if (rl->version != TLS_ANY_VERSION && rl->version != vers) in tls_any_set_protocol_version()
134 rl->version = vers; in tls_any_set_protocol_version()
139 static int tls_any_prepare_for_encryption(OSSL_RECORD_LAYER *rl, in tls_any_prepare_for_encryption() argument
169 static int dtls_any_set_protocol_version(OSSL_RECORD_LAYER *rl, int vers) in dtls_any_set_protocol_version() argument
171 if (rl->version != DTLS_ANY_VERSION && rl->version != vers) in dtls_any_set_protocol_version()
173 rl->version = vers; in dtls_any_set_protocol_version()