diff options
author | Richard Levitte <levitte@openssl.org> | 2019-09-23 11:16:21 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-10-17 09:16:45 +0200 |
commit | 506cb0f6322b24c980273ff5cd8f2c973a12b42f (patch) | |
tree | 773bbde5c66b9bc899c1e4d986e1a39ee3bb2f72 /crypto/evp/evp_lib.c | |
parent | f651c727f85813085355bb207cf913288108ed79 (diff) | |
download | openssl-new-506cb0f6322b24c980273ff5cd8f2c973a12b42f.tar.gz |
EVP: add functions that return the name number
The returned number can be used for comparison purposes.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/9979)
Diffstat (limited to 'crypto/evp/evp_lib.c')
-rw-r--r-- | crypto/evp/evp_lib.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c index f5e2505e0a..c25c40ddb0 100644 --- a/crypto/evp/evp_lib.c +++ b/crypto/evp/evp_lib.c @@ -545,6 +545,11 @@ int EVP_CIPHER_is_a(const EVP_CIPHER *cipher, const char *name) return evp_is_a(cipher->prov, cipher->name_id, name); } +int EVP_CIPHER_number(const EVP_CIPHER *cipher) +{ + return cipher->name_id; +} + const char *EVP_CIPHER_name(const EVP_CIPHER *cipher) { if (cipher->prov != NULL) @@ -586,6 +591,11 @@ int EVP_MD_is_a(const EVP_MD *md, const char *name) return evp_is_a(md->prov, md->name_id, name); } +int EVP_MD_number(const EVP_MD *md) +{ + return md->name_id; +} + const char *EVP_MD_name(const EVP_MD *md) { if (md->prov != NULL) |