From: Dmitry Belyavskiy Date: Tue, 21 Jan 2020 17:08:38 +0000 (+0300) Subject: Legacy digests can have custom control values X-Git-Tag: openssl-3.0.0-alpha1~624 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=1f457256ce6a1b2fd7e3f62eee8faa74cd5c835e Legacy digests can have custom control values Fixes #10915. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10916) --- diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index adde3e13ab..9808b66bbd 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -663,7 +663,7 @@ int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2) } if (ctx->digest->prov == NULL - && (ctx->pctx == NULL + || (ctx->pctx == NULL || (ctx->pctx->operation != EVP_PKEY_OP_VERIFYCTX && ctx->pctx->operation != EVP_PKEY_OP_SIGNCTX))) goto legacy;