summaryrefslogtreecommitdiffstats
path: root/crypto/evp/m_sigver.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-09-30 17:22:27 +0200
committerRichard Levitte <levitte@openssl.org>2020-10-01 19:54:10 +0200
commitf21c9c64f53484d4abe25b76d29350ed683db855 (patch)
treee604b9ba7f95fb1b92314c71b0d564ecac3ed074 /crypto/evp/m_sigver.c
parent7d80985e178d77226392f9c35c36f3f885b884d7 (diff)
EVP: use evp_pkey_ctx_is_legacy() to find what implementation to use
We've had explicit checks for when to fall back to legacy code for operations that use an EVP_PKEY. Unfortunately, the checks were radically different in different spots, so we refactor that into a macro that gets used everywhere. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13043)
Diffstat (limited to 'crypto/evp/m_sigver.c')
-rw-r--r--crypto/evp/m_sigver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/m_sigver.c b/crypto/evp/m_sigver.c
index faf5191234..783225b6f7 100644
--- a/crypto/evp/m_sigver.c
+++ b/crypto/evp/m_sigver.c
@@ -80,7 +80,7 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
*/
ERR_set_mark();
- if (locpctx->engine != NULL || locpctx->keytype == NULL)
+ if (evp_pkey_ctx_is_legacy(locpctx))
goto legacy;
/*