summaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorDmitry Belyavskiy <beldmit@gmail.com>2020-01-21 20:08:38 +0300
committerDmitry Belyavskiy <beldmit@gmail.com>2020-01-22 20:13:03 +0300
commit1f457256ce6a1b2fd7e3f62eee8faa74cd5c835e (patch)
tree0403eb3fe71665fcf697d23444a6f6aa65d8892b /crypto/evp
parent32be631ca1f2b73c92e4f7f5d23f1c3aee80ec69 (diff)
Legacy digests can have custom control values
Fixes #10915. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10916)
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/digest.c2
1 files changed, 1 insertions, 1 deletions
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;