Revert "Legacy digests can have custom control values"
authorMatt Caswell <matt@openssl.org>
Fri, 31 Jan 2020 22:44:56 +0000 (22:44 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 3 Feb 2020 09:44:05 +0000 (09:44 +0000)
This reverts commit 1f457256ce6a1b2fd7e3f62eee8faa74cd5c835e.

This is causing Travis failures.

[extended tests]

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10989)

crypto/evp/digest.c

index 9808b66..adde3e1 100644 (file)
@@ -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;