diff options
author | Richard Levitte <levitte@openssl.org> | 2021-02-10 16:55:19 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-02-23 13:41:47 +0100 |
commit | 6179dfc7c4bd850004c3b4b8220f3559573130d5 (patch) | |
tree | 145212e694a514211482e23912ae4cc976df5fe8 /include | |
parent | util/perl/OpenSSL/config.pm: Add VMS specific C compiler settings (diff) | |
download | openssl-6179dfc7c4bd850004c3b4b8220f3559573130d5.tar.xz openssl-6179dfc7c4bd850004c3b4b8220f3559573130d5.zip |
EVP: Implement EVP_PKEY_CTX_is_a()
This does what was previously done by looking at pctx->pmeth->pkey_id,
but handles both legacy and provider side contexts, and is supposed to
become a replacement for the old way.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13913)
Diffstat (limited to 'include')
-rw-r--r-- | include/crypto/evp.h | 2 | ||||
-rw-r--r-- | include/openssl/evp.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/include/crypto/evp.h b/include/crypto/evp.h index 7f28edd6c2..cc74f11548 100644 --- a/include/crypto/evp.h +++ b/include/crypto/evp.h @@ -23,7 +23,7 @@ #define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX 0x0400 /* - * An EVP_PKEY can have the following support states: + * An EVP_PKEY_CTX can have the following support states: * * Supports legacy implementations only: * diff --git a/include/openssl/evp.h b/include/openssl/evp.h index bdce18c5ee..1bf244322e 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1649,6 +1649,7 @@ EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_pkey(OSSL_LIB_CTX *libctx, EVP_PKEY *pkey, const char *propquery); EVP_PKEY_CTX *EVP_PKEY_CTX_dup(const EVP_PKEY_CTX *ctx); void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx); +int EVP_PKEY_CTX_is_a(EVP_PKEY_CTX *ctx, const char *keytype); int EVP_PKEY_CTX_get_params(EVP_PKEY_CTX *ctx, OSSL_PARAM *params); const OSSL_PARAM *EVP_PKEY_CTX_gettable_params(EVP_PKEY_CTX *ctx); |