summaryrefslogtreecommitdiffstats
path: root/crypto/evp/asymcipher.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-10-01 12:06:52 +0200
committerRichard Levitte <levitte@openssl.org>2021-10-27 12:41:12 +0200
commitff7781462dd04ab99c159136b47672252bad7fa8 (patch)
treee60e8308caea8a86bf69ad301f9d795a12f90623 /crypto/evp/asymcipher.c
parent5246183e7a9f9fb1819d50ab40e2fecc68235e0d (diff)
EVP: Add internal functions to fetch type specific EVP methods from provider
Added functions: evp_signature_fetch_from_prov(), evp_asym_cipher_fetch_from_prov(), evp_keyexch_fetch_from_prov(), evp_kem_fetch_from_prov() These are all like the public conterparts, except they all take a provider instead of a library context as first argument. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16725)
Diffstat (limited to 'crypto/evp/asymcipher.c')
-rw-r--r--crypto/evp/asymcipher.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/evp/asymcipher.c b/crypto/evp/asymcipher.c
index 41aea6b1d8..e2912829e2 100644
--- a/crypto/evp/asymcipher.c
+++ b/crypto/evp/asymcipher.c
@@ -425,6 +425,17 @@ EVP_ASYM_CIPHER *EVP_ASYM_CIPHER_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
(void (*)(void *))EVP_ASYM_CIPHER_free);
}
+EVP_ASYM_CIPHER *evp_asym_cipher_fetch_from_prov(OSSL_PROVIDER *prov,
+ const char *algorithm,
+ const char *properties)
+{
+ return evp_generic_fetch_from_prov(prov, OSSL_OP_ASYM_CIPHER,
+ algorithm, properties,
+ evp_asym_cipher_from_algorithm,
+ (int (*)(void *))EVP_ASYM_CIPHER_up_ref,
+ (void (*)(void *))EVP_ASYM_CIPHER_free);
+}
+
int EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name)
{
return evp_is_a(cipher->prov, cipher->name_id, NULL, name);