From 5b888e931b64a132a0cd33b24344dc6cdac74727 Mon Sep 17 00:00:00 2001 From: Petr Gotthard Date: Mon, 15 Feb 2021 11:53:45 +0100 Subject: [PATCH] Fix propquery handling in EVP_DigestSignInit_ex Fixes #14183. Fix the condition to detect legacy engines, so the `props` are considered even when libctx == NULL. Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/14188) --- crypto/evp/m_sigver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/evp/m_sigver.c b/crypto/evp/m_sigver.c index bdcac90078..57c8ce78a4 100644 --- a/crypto/evp/m_sigver.c +++ b/crypto/evp/m_sigver.c @@ -60,7 +60,7 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, } if (ctx->pctx == NULL) { - if (libctx != NULL) + if (e == NULL) ctx->pctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, props); else ctx->pctx = EVP_PKEY_CTX_new(pkey, e); -- 2.34.1