From: tb Date: Tue, 9 Jul 2024 17:00:25 +0000 (+0000) Subject: Test & assign once more X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=479a9339a387018d49ad20c0407ef86889d54009;p=openbsd Test & assign once more --- diff --git a/lib/libcrypto/kdf/tls1_prf.c b/lib/libcrypto/kdf/tls1_prf.c index 8df72bd8b6b..970d77253bf 100644 --- a/lib/libcrypto/kdf/tls1_prf.c +++ b/lib/libcrypto/kdf/tls1_prf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls1_prf.c,v 1.27 2024/07/09 16:59:50 tb Exp $ */ +/* $OpenBSD: tls1_prf.c,v 1.28 2024/07/09 17:00:25 tb Exp $ */ /* * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project * 2016. @@ -270,10 +270,10 @@ tls1_prf_P_hash(const EVP_MD *md, EVP_MD_CTX_set_flags(ctx_init, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); - mac_key = EVP_PKEY_new_raw_private_key(EVP_PKEY_HMAC, NULL, secret, - secret_len); - if (mac_key == NULL) + if ((mac_key = EVP_PKEY_new_raw_private_key(EVP_PKEY_HMAC, NULL, + secret, secret_len)) == NULL) goto err; + if (!EVP_DigestSignInit(ctx_init, NULL, md, NULL, mac_key)) goto err; if (!EVP_MD_CTX_copy_ex(ctx, ctx_init))