]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add EVP_MAC_provider()
authorRichard Levitte <levitte@openssl.org>
Tue, 4 Jun 2019 16:14:38 +0000 (18:14 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 15 Aug 2019 20:12:25 +0000 (22:12 +0200)
For information processing.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8877)

crypto/evp/mac_meth.c
doc/man3/EVP_MAC.pod
include/openssl/evp.h

index 983b2dbd2ed98ef8d339698505fb9a03bdf7b4ee..e2bb016c0f63dd846802a91464c00be15c2667ad 100644 (file)
@@ -173,6 +173,11 @@ const char *EVP_MAC_name(const EVP_MAC *mac)
     return mac->name;
 }
 
+const OSSL_PROVIDER *EVP_MAC_provider(const EVP_MAC *mac)
+{
+    return mac->prov;
+}
+
 const OSSL_PARAM *EVP_MAC_gettable_params(const EVP_MAC *mac)
 {
     if (mac->gettable_params == NULL)
index 6723c9707b9e6f0dda9386b703ce35b6266f6252..ed38f912df447383edf7cfc8fb9a64745e54eb78 100644 (file)
@@ -3,7 +3,7 @@
 =head1 NAME
 
 EVP_MAC, EVP_MAC_fetch, EVP_MAC_up_ref, EVP_MAC_free, EVP_MAC_name,
-EVP_MAC_get_params, EVP_MAC_gettable_params,
+EVP_MAC_provider, EVP_MAC_get_params, EVP_MAC_gettable_params,
 EVP_MAC_CTX, EVP_MAC_CTX_new, EVP_MAC_CTX_free, EVP_MAC_CTX_dup,
 EVP_MAC_CTX_mac, EVP_MAC_CTX_get_params, EVP_MAC_CTX_set_params,
 EVP_MAC_size, EVP_MAC_init, EVP_MAC_update, EVP_MAC_final,
@@ -22,6 +22,7 @@ EVP_MAC_CTX_gettable_params, EVP_MAC_CTX_settable_params
  int EVP_MAC_up_ref(EVP_MAC *mac);
  void EVP_MAC_free(EVP_MAC *mac);
  const char *EVP_MAC_name(const EVP_MAC *mac);
+ const OSSL_PROVIDER *EVP_MAC_provider(const EVP_MAC *mac);
  int EVP_MAC_get_params(EVP_MAC *mac, OSSL_PARAM params[]);
 
  EVP_MAC_CTX *EVP_MAC_CTX_new(EVP_MAC *mac);
@@ -152,6 +153,9 @@ EVP_MAC_size() returns the MAC output size for the given context.
 
 EVP_MAC_name() returns the name of the given MAC implementation.
 
+EVP_MAC_provider() returns the provider that holds the implementation
+of the given I<mac>.
+
 =head1 PARAMETER NAMES
 
 The standard parameter names are:
@@ -239,6 +243,9 @@ EVP_MAC_free() returns nothing at all.
 EVP_MAC_name() returns the name of the MAC, or NULL if NULL was
 passed.
 
+EVP_MAC_provider() returns a pointer to the provider for the MAC, or
+NULL on error.
+
 EVP_MAC_CTX_new() and EVP_MAC_CTX_dup() return a pointer to a newly
 created EVP_MAC_CTX, or NULL if allocation failed.
 
index c9b665dbbc703502f6cf618f5113487ed3b2517f..2956b0408cb87bb9b55640565e59d8d272b10b86 100644 (file)
@@ -1031,6 +1031,7 @@ EVP_MAC *EVP_MAC_fetch(OPENSSL_CTX *libctx, const char *algorithm,
 int EVP_MAC_up_ref(EVP_MAC *mac);
 void EVP_MAC_free(EVP_MAC *mac);
 const char *EVP_MAC_name(const EVP_MAC *mac);
+const OSSL_PROVIDER *EVP_MAC_provider(const EVP_MAC *mac);
 int EVP_MAC_get_params(EVP_MAC *mac, OSSL_PARAM params[]);
 
 EVP_MAC_CTX *EVP_MAC_CTX_new(EVP_MAC *mac);