X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fkdf%2Ftls1_prf.c;h=063ea0390aeaf86faba3a41cdb3f3793dc060664;hp=f5e106346131d45b1ee1adc2cd0d62548dd101ad;hb=5b277519236c17a9968623b1f038fe6b34e89899;hpb=f55129c73920a060e813c883d864222482e067c8 diff --git a/crypto/kdf/tls1_prf.c b/crypto/kdf/tls1_prf.c index f5e1063461..063ea0390a 100644 --- a/crypto/kdf/tls1_prf.c +++ b/crypto/kdf/tls1_prf.c @@ -128,7 +128,11 @@ static int pkey_tls1_prf_derive(EVP_PKEY_CTX *ctx, unsigned char *key, KDFerr(KDF_F_PKEY_TLS1_PRF_DERIVE, KDF_R_MISSING_MESSAGE_DIGEST); return 0; } - if (kctx->sec == NULL || kctx->seedlen == 0) { + if (kctx->sec == NULL) { + KDFerr(KDF_F_PKEY_TLS1_PRF_DERIVE, KDF_R_MISSING_SECRET); + return 0; + } + if (kctx->seedlen == 0) { KDFerr(KDF_F_PKEY_TLS1_PRF_DERIVE, KDF_R_MISSING_SEED); return 0; }