Lines Matching refs:md
33 const EVP_MD *md, in tls13_hkdf_expand_ex() argument
43 const char *mdname = EVP_MD_get0_name(md); in tls13_hkdf_expand_ex()
64 if ((ret = EVP_MD_get_size(md)) <= 0) { in tls13_hkdf_expand_ex()
99 int tls13_hkdf_expand(SSL_CONNECTION *s, const EVP_MD *md, in tls13_hkdf_expand() argument
108 ret = tls13_hkdf_expand_ex(sctx->libctx, sctx->propq, md, in tls13_hkdf_expand()
121 int tls13_derive_key(SSL_CONNECTION *s, const EVP_MD *md, in tls13_derive_key() argument
128 return tls13_hkdf_expand(s, md, secret, keylabel, sizeof(keylabel) - 1, in tls13_derive_key()
136 int tls13_derive_iv(SSL_CONNECTION *s, const EVP_MD *md, in tls13_derive_iv() argument
143 return tls13_hkdf_expand(s, md, secret, ivlabel, sizeof(ivlabel) - 1, in tls13_derive_iv()
147 int tls13_derive_finishedkey(SSL_CONNECTION *s, const EVP_MD *md, in tls13_derive_finishedkey() argument
154 return tls13_hkdf_expand(s, md, secret, finishedlabel, in tls13_derive_finishedkey()
163 int tls13_generate_secret(SSL_CONNECTION *s, const EVP_MD *md, in tls13_generate_secret() argument
176 const char *mdname = EVP_MD_get0_name(md); in tls13_generate_secret()
189 mdleni = EVP_MD_get_size(md); in tls13_generate_secret()
249 const EVP_MD *md = ssl_handshake_md(s); in tls13_generate_master_secret() local
252 md_size = EVP_MD_get_size(md); in tls13_generate_master_secret()
259 return tls13_generate_secret(s, md, prev, NULL, 0, out); in tls13_generate_master_secret()
269 const EVP_MD *md = ssl_handshake_md(s); in tls13_final_finish_mac() local
270 const char *mdname = EVP_MD_get0_name(md); in tls13_final_finish_mac()
278 if (md == NULL) in tls13_final_finish_mac()
298 if (!tls13_derive_finishedkey(s, md, in tls13_final_finish_mac()
347 static int derive_secret_key_and_iv(SSL_CONNECTION *s, const EVP_MD *md, in derive_secret_key_and_iv() argument
359 int hashleni = EVP_MD_get_size(md); in derive_secret_key_and_iv()
370 if (!tls13_hkdf_expand(s, md, insecret, label, labellen, hash, hashlen, in derive_secret_key_and_iv()
439 if (!tls13_derive_key(s, md, secret, key, *keylen) in derive_secret_key_and_iv()
440 || !tls13_derive_iv(s, md, secret, *iv, *ivlen)) { in derive_secret_key_and_iv()
479 const EVP_MD *md = NULL, *mac_md = NULL; in tls13_change_cipher_state() local
557 md = ssl_md(sctx, sslcipher->algorithm2); in tls13_change_cipher_state()
558 if (md == NULL || !EVP_DigestInit_ex(mdctx, md, NULL) in tls13_change_cipher_state()
568 if (!tls13_hkdf_expand(s, md, insecret, in tls13_change_cipher_state()
639 md = ssl_handshake_md(s); in tls13_change_cipher_state()
679 if (!derive_secret_key_and_iv(s, md, cipher, mac_pkey_type, mac_md, in tls13_change_cipher_state()
735 mac_pkey_type, mac_md, NULL, md)) { in tls13_change_cipher_state()
759 const EVP_MD *md = ssl_handshake_md(s); in tls13_update_key() local
772 if ((l = EVP_MD_get_size(md)) <= 0) { in tls13_update_key()
783 if (!derive_secret_key_and_iv(s, md, in tls13_update_key()
801 NULL, md)) { in tls13_update_key()
840 const EVP_MD *md = ssl_handshake_md(s); in tls13_export_keying_material() local
845 if (ctx == NULL || md == NULL || !ossl_statem_export_allowed(s)) in tls13_export_keying_material()
851 if (EVP_DigestInit_ex(ctx, md, NULL) <= 0 in tls13_export_keying_material()
854 || EVP_DigestInit_ex(ctx, md, NULL) <= 0 in tls13_export_keying_material()
856 || !tls13_hkdf_expand(s, md, s->exporter_master_secret, in tls13_export_keying_material()
859 || !tls13_hkdf_expand(s, md, exportsecret, exporterlabel, in tls13_export_keying_material()
880 const EVP_MD *md; in tls13_export_keying_material_early() local
895 md = ssl_md(SSL_CONNECTION_GET_CTX(s), sslcipher->algorithm2); in tls13_export_keying_material_early()
912 if (md == NULL in tls13_export_keying_material_early()
913 || EVP_DigestInit_ex(ctx, md, NULL) <= 0 in tls13_export_keying_material_early()
916 || EVP_DigestInit_ex(ctx, md, NULL) <= 0 in tls13_export_keying_material_early()
918 || !tls13_hkdf_expand(s, md, s->early_exporter_master_secret, in tls13_export_keying_material_early()
921 || !tls13_hkdf_expand(s, md, exportsecret, exporterlabel, in tls13_export_keying_material_early()