summaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_rand.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/evp_rand.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/evp_rand.c')
-rw-r--r--crypto/evp/evp_rand.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/evp/evp_rand.c b/crypto/evp/evp_rand.c
index 131550b4f3..cae21891ee 100644
--- a/crypto/evp/evp_rand.c
+++ b/crypto/evp/evp_rand.c
@@ -295,6 +295,11 @@ const char *EVP_RAND_name(const EVP_RAND *rand)
return evp_first_name(rand->prov, rand->name_id);
}
+const char *EVP_RAND_description(const EVP_RAND *rand)
+{
+ return rand->description;
+}
+
int EVP_RAND_is_a(const EVP_RAND *rand, const char *name)
{
return evp_is_a(rand->prov, rand->name_id, NULL, name);