summaryrefslogtreecommitdiffstats
path: root/crypto/evp/exchange.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-03-16 14:23:54 +0100
committerRichard Levitte <levitte@openssl.org>2021-04-02 08:57:47 +0200
commit03888233290bf3b8410e8dc2acbef8950fffef60 (patch)
treecffa3d7c31504acbc2b80d7fe7d826381acc76fe /crypto/evp/exchange.c
parentb638dad970c65e311e9a724b89972441268adc9f (diff)
EVP: Add EVP_<TYPE>_description()
The following operation types are covered: EVP_MD, EVP_CIPHER, EVP_MAC, EVP_RAND, EVP_KEYMGMT, EVP_SIGNATURE, EVP_ASYM_CIPHER, EVP_KEM, EVP_KEYEXCH, EVP_KDF. Also EVP_PKEY. For EVP_MD and EVP_CIPHER, OBJ_nid2ln() is used as a fallback for legacy implementations. For EVP_PKEY, the info field of the EVP_PKEY_ASN1_METHOD is used as a fallback for legacy implementations. Fixes #14514 Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14656)
Diffstat (limited to 'crypto/evp/exchange.c')
-rw-r--r--crypto/evp/exchange.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/evp/exchange.c b/crypto/evp/exchange.c
index fd8e9210a1..07d5e4ab9b 100644
--- a/crypto/evp/exchange.c
+++ b/crypto/evp/exchange.c
@@ -465,6 +465,11 @@ int EVP_KEYEXCH_number(const EVP_KEYEXCH *keyexch)
return keyexch->name_id;
}
+const char *EVP_KEYEXCH_description(const EVP_KEYEXCH *keyexch)
+{
+ return keyexch->description;
+}
+
int EVP_KEYEXCH_is_a(const EVP_KEYEXCH *keyexch, const char *name)
{
return evp_is_a(keyexch->prov, keyexch->name_id, NULL, name);