Lines Matching refs:rl

17 static int ssl3_set_crypto_state(OSSL_RECORD_LAYER *rl, int level,  in ssl3_set_crypto_state()  argument
28 int enc = (rl->direction == OSSL_RECORD_DIRECTION_WRITE) ? 1 : 0; in ssl3_set_crypto_state()
35 if ((rl->enc_ctx = EVP_CIPHER_CTX_new()) == NULL) { in ssl3_set_crypto_state()
39 ciph_ctx = rl->enc_ctx; in ssl3_set_crypto_state()
41 rl->md_ctx = EVP_MD_CTX_new(); in ssl3_set_crypto_state()
42 if (rl->md_ctx == NULL) { in ssl3_set_crypto_state()
47 if ((md != NULL && EVP_DigestInit_ex(rl->md_ctx, md, NULL) <= 0)) { in ssl3_set_crypto_state()
54 rl->compctx = COMP_CTX_new(comp); in ssl3_set_crypto_state()
55 if (rl->compctx == NULL) { in ssl3_set_crypto_state()
72 && !ossl_set_tls_provider_parameters(rl, ciph_ctx, ciph, md)) { in ssl3_set_crypto_state()
77 if (mackeylen > sizeof(rl->mac_secret)) { in ssl3_set_crypto_state()
81 memcpy(rl->mac_secret, mackey, mackeylen); in ssl3_set_crypto_state()
95 static int ssl3_cipher(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *inrecs, in ssl3_cipher() argument
113 ds = rl->enc_ctx; in ssl3_cipher()
175 RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR); in ssl3_cipher()
182 RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC, ERR_R_INTERNAL_ERROR); in ssl3_cipher()
194 rl->libctx); in ssl3_cipher()
218 static int ssl3_mac(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *rec, unsigned char *md, in ssl3_mac() argument
221 unsigned char *mac_sec, *seq = rl->sequence; in ssl3_mac()
228 mac_sec = &(rl->mac_secret[0]); in ssl3_mac()
229 hash = rl->md_ctx; in ssl3_mac()
238 && EVP_CIPHER_CTX_get_mode(rl->enc_ctx) == EVP_CIPH_CBC_MODE in ssl3_mac()
308 if (!tls_increment_sequence_ctr(rl)) in ssl3_mac()