From: Richard Levitte Date: Sun, 2 Feb 2020 12:09:29 +0000 (+0100) Subject: EVP_MD_CTX_ctrl(): Remove unnecessary control X-Git-Tag: openssl-3.0.0-alpha1~552 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e3b1ccad694aabfffbde68c56fb8d44c011f98b1;p=oweals%2Fopenssl.git EVP_MD_CTX_ctrl(): Remove unnecessary control A check was present as to what operation is performed with this context. It may have been useful at some point, but isn't any more. Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/10947) --- diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index adde3e13ab..be6fcb58f1 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -662,10 +662,7 @@ int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2) return 0; } - if (ctx->digest->prov == NULL - && (ctx->pctx == NULL - || (ctx->pctx->operation != EVP_PKEY_OP_VERIFYCTX - && ctx->pctx->operation != EVP_PKEY_OP_SIGNCTX))) + if (ctx->digest->prov == NULL) goto legacy; switch (cmd) {