summaryrefslogtreecommitdiffstats
path: root/crypto/evp/mac_lib.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-09-23 11:16:21 +0200
committerRichard Levitte <levitte@openssl.org>2019-10-17 09:16:45 +0200
commit506cb0f6322b24c980273ff5cd8f2c973a12b42f (patch)
tree773bbde5c66b9bc899c1e4d986e1a39ee3bb2f72 /crypto/evp/mac_lib.c
parentf651c727f85813085355bb207cf913288108ed79 (diff)
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/mac_lib.c')
-rw-r--r--crypto/evp/mac_lib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/evp/mac_lib.c b/crypto/evp/mac_lib.c
index 8581853802..07ed1c8749 100644
--- a/crypto/evp/mac_lib.c
+++ b/crypto/evp/mac_lib.c
@@ -158,6 +158,11 @@ int EVP_MAC_CTX_set_params(EVP_MAC_CTX *ctx, const OSSL_PARAM params[])
return 1;
}
+int EVP_MAC_number(const EVP_MAC *mac)
+{
+ return mac->name_id;
+}
+
int EVP_MAC_is_a(const EVP_MAC *mac, const char *name)
{
return evp_is_a(mac->prov, mac->name_id, name);