diff options
author | Pauli <paul.dale@oracle.com> | 2020-09-22 09:25:35 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-09-23 15:28:29 +1000 |
commit | c9452d74a4bad8853ca60889788e51d46328877d (patch) | |
tree | 5e90e505ef817b721dbe2e690d0acd2f5f5d7205 /crypto/evp/mac_lib.c | |
parent | d8e52fd05e350ee308715c46ac13dbea2899a6ce (diff) |
kdf/mac: add name query calls for KDFs and MACs
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12931)
Diffstat (limited to 'crypto/evp/mac_lib.c')
-rw-r--r-- | crypto/evp/mac_lib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/evp/mac_lib.c b/crypto/evp/mac_lib.c index 79dd49ae20..d76ffedcb8 100644 --- a/crypto/evp/mac_lib.c +++ b/crypto/evp/mac_lib.c @@ -162,6 +162,13 @@ int EVP_MAC_number(const EVP_MAC *mac) return mac->name_id; } +const char *EVP_MAC_name(const EVP_MAC *mac) +{ + if (mac->prov != NULL) + return evp_first_name(mac->prov, mac->name_id); + return NULL; +} + int EVP_MAC_is_a(const EVP_MAC *mac, const char *name) { return evp_is_a(mac->prov, mac->name_id, NULL, name); |