diff options
author | Richard Levitte <levitte@openssl.org> | 2020-09-30 17:22:27 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-10-01 19:54:10 +0200 |
commit | f21c9c64f53484d4abe25b76d29350ed683db855 (patch) | |
tree | e604b9ba7f95fb1b92314c71b0d564ecac3ed074 /crypto/evp/signature.c | |
parent | 7d80985e178d77226392f9c35c36f3f885b884d7 (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/signature.c')
-rw-r--r-- | crypto/evp/signature.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/signature.c b/crypto/evp/signature.c index 7a2af1b5a2..c0126501f8 100644 --- a/crypto/evp/signature.c +++ b/crypto/evp/signature.c @@ -381,7 +381,7 @@ static int evp_pkey_signature_init(EVP_PKEY_CTX *ctx, int operation) */ ERR_set_mark(); - if (ctx->keymgmt == NULL) + if (evp_pkey_ctx_is_legacy(ctx)) goto legacy; /* |