summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-08-19 17:33:38 +0100
committerPauli <paul.dale@oracle.com>2020-08-29 17:40:12 +1000
commite3bf65da88f714f8721c2985f235b12a7f90d9f8 (patch)
tree95f1f844432509889d9ba1b105bafb0f6328c82e /providers
parent52ae0f8fc23570b6b7cc98d1cb0d6f6dd53ea98a (diff)
Include "legacy" in the name of the various MAC bridge functions
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12637)
Diffstat (limited to 'providers')
-rw-r--r--providers/defltprov.c16
-rw-r--r--providers/fips/fipsprov.c8
-rw-r--r--providers/implementations/include/prov/implementations.h12
-rw-r--r--providers/implementations/keymgmt/mac_legacy_kmgmt.c5
-rw-r--r--providers/implementations/signature/mac_legacy.c3
5 files changed, 21 insertions, 23 deletions
diff --git a/providers/defltprov.c b/providers/defltprov.c
index ff5768af74..943bdc6136 100644
--- a/providers/defltprov.c
+++ b/providers/defltprov.c
@@ -364,13 +364,13 @@ static const OSSL_ALGORITHM deflt_signature[] = {
{ "ED448:Ed448", "provider=default", ed448_signature_functions },
{ "ECDSA", "provider=default", ecdsa_signature_functions },
#endif
- { "HMAC", "provider=default", mac_hmac_signature_functions },
- { "SIPHASH", "provider=default", mac_siphash_signature_functions },
+ { "HMAC", "provider=default", mac_legacy_hmac_signature_functions },
+ { "SIPHASH", "provider=default", mac_legacy_siphash_signature_functions },
#ifndef OPENSSL_NO_POLY1305
- { "POLY1305", "provider=default", mac_poly1305_signature_functions },
+ { "POLY1305", "provider=default", mac_legacy_poly1305_signature_functions },
#endif
#ifndef OPENSSL_NO_CMAC
- { "CMAC", "provider=default", mac_cmac_signature_functions },
+ { "CMAC", "provider=default", mac_legacy_cmac_signature_functions },
#endif
{ NULL, NULL, NULL }
};
@@ -400,13 +400,13 @@ static const OSSL_ALGORITHM deflt_keymgmt[] = {
{ "TLS1-PRF", "provider=default", kdf_keymgmt_functions },
{ "HKDF", "provider=default", kdf_keymgmt_functions },
{ "SCRYPT:id-scrypt", "provider=default", kdf_keymgmt_functions },
- { "HMAC", "provider=default", mac_keymgmt_functions },
- { "SIPHASH", "provider=default", mac_keymgmt_functions },
+ { "HMAC", "provider=default", mac_legacy_keymgmt_functions },
+ { "SIPHASH", "provider=default", mac_legacy_keymgmt_functions },
#ifndef OPENSSL_NO_POLY1305
- { "POLY1305", "provider=default", mac_keymgmt_functions },
+ { "POLY1305", "provider=default", mac_legacy_keymgmt_functions },
#endif
#ifndef OPENSSL_NO_CMAC
- { "CMAC", "provider=default", cmac_keymgmt_functions },
+ { "CMAC", "provider=default", cmac_legacy_keymgmt_functions },
#endif
{ NULL, NULL, NULL }
};
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c
index 0ab24434ba..c9867f998c 100644
--- a/providers/fips/fipsprov.c
+++ b/providers/fips/fipsprov.c
@@ -436,9 +436,9 @@ static const OSSL_ALGORITHM fips_signature[] = {
{ "ED448", FIPS_DEFAULT_PROPERTIES, ed448_signature_functions },
{ "ECDSA", FIPS_DEFAULT_PROPERTIES, ecdsa_signature_functions },
#endif
- { "HMAC", FIPS_DEFAULT_PROPERTIES, mac_hmac_signature_functions },
+ { "HMAC", FIPS_DEFAULT_PROPERTIES, mac_legacy_hmac_signature_functions },
#ifndef OPENSSL_NO_CMAC
- { "CMAC", FIPS_DEFAULT_PROPERTIES, mac_cmac_signature_functions },
+ { "CMAC", FIPS_DEFAULT_PROPERTIES, mac_legacy_cmac_signature_functions },
#endif
{ NULL, NULL, NULL }
};
@@ -468,9 +468,9 @@ static const OSSL_ALGORITHM fips_keymgmt[] = {
#endif
{ "TLS1-PRF", FIPS_DEFAULT_PROPERTIES, kdf_keymgmt_functions },
{ "HKDF", FIPS_DEFAULT_PROPERTIES, kdf_keymgmt_functions },
- { "HMAC", FIPS_DEFAULT_PROPERTIES, mac_keymgmt_functions },
+ { "HMAC", FIPS_DEFAULT_PROPERTIES, mac_legacy_keymgmt_functions },
#ifndef OPENSSL_NO_CMAC
- { "CMAC", FIPS_DEFAULT_PROPERTIES, cmac_keymgmt_functions },
+ { "CMAC", FIPS_DEFAULT_PROPERTIES, cmac_legacy_keymgmt_functions },
#endif
{ NULL, NULL, NULL }
};
diff --git a/providers/implementations/include/prov/implementations.h b/providers/implementations/include/prov/implementations.h
index e266bd7554..1b8642415f 100644
--- a/providers/implementations/include/prov/implementations.h
+++ b/providers/implementations/include/prov/implementations.h
@@ -278,8 +278,8 @@ extern const OSSL_DISPATCH ed25519_keymgmt_functions[];
extern const OSSL_DISPATCH ed448_keymgmt_functions[];
extern const OSSL_DISPATCH ec_keymgmt_functions[];
extern const OSSL_DISPATCH kdf_keymgmt_functions[];
-extern const OSSL_DISPATCH mac_keymgmt_functions[];
-extern const OSSL_DISPATCH cmac_keymgmt_functions[];
+extern const OSSL_DISPATCH mac_legacy_keymgmt_functions[];
+extern const OSSL_DISPATCH cmac_legacy_keymgmt_functions[];
/* Key Exchange */
extern const OSSL_DISPATCH dh_keyexch_functions[];
@@ -296,10 +296,10 @@ extern const OSSL_DISPATCH rsa_signature_functions[];
extern const OSSL_DISPATCH ed25519_signature_functions[];
extern const OSSL_DISPATCH ed448_signature_functions[];
extern const OSSL_DISPATCH ecdsa_signature_functions[];
-extern const OSSL_DISPATCH mac_hmac_signature_functions[];
-extern const OSSL_DISPATCH mac_siphash_signature_functions[];
-extern const OSSL_DISPATCH mac_poly1305_signature_functions[];
-extern const OSSL_DISPATCH mac_cmac_signature_functions[];
+extern const OSSL_DISPATCH mac_legacy_hmac_signature_functions[];
+extern const OSSL_DISPATCH mac_legacy_siphash_signature_functions[];
+extern const OSSL_DISPATCH mac_legacy_poly1305_signature_functions[];
+extern const OSSL_DISPATCH mac_legacy_cmac_signature_functions[];
/* Asym Cipher */
extern const OSSL_DISPATCH rsa_asym_cipher_functions[];
diff --git a/providers/implementations/keymgmt/mac_legacy_kmgmt.c b/providers/implementations/keymgmt/mac_legacy_kmgmt.c
index 779240e036..dd18eecf12 100644
--- a/providers/implementations/keymgmt/mac_legacy_kmgmt.c
+++ b/providers/implementations/keymgmt/mac_legacy_kmgmt.c
@@ -320,7 +320,6 @@ static const OSSL_PARAM *cmac_gettable_params(void *provctx)
return gettable_params;
}
-
static int mac_set_params(void *keydata, const OSSL_PARAM params[])
{
MAC_KEY *key = keydata;
@@ -469,7 +468,7 @@ static void mac_gen_cleanup(void *genctx)
OPENSSL_free(gctx);
}
-const OSSL_DISPATCH mac_keymgmt_functions[] = {
+const OSSL_DISPATCH mac_legacy_keymgmt_functions[] = {
{ OSSL_FUNC_KEYMGMT_NEW, (void (*)(void))mac_new },
{ OSSL_FUNC_KEYMGMT_FREE, (void (*)(void))mac_free },
{ OSSL_FUNC_KEYMGMT_GET_PARAMS, (void (*) (void))mac_get_params },
@@ -491,7 +490,7 @@ const OSSL_DISPATCH mac_keymgmt_functions[] = {
{ 0, NULL }
};
-const OSSL_DISPATCH cmac_keymgmt_functions[] = {
+const OSSL_DISPATCH cmac_legacy_keymgmt_functions[] = {
{ OSSL_FUNC_KEYMGMT_NEW, (void (*)(void))mac_new_cmac },
{ OSSL_FUNC_KEYMGMT_FREE, (void (*)(void))mac_free },
{ OSSL_FUNC_KEYMGMT_GET_PARAMS, (void (*) (void))mac_get_params },
diff --git a/providers/implementations/signature/mac_legacy.c b/providers/implementations/signature/mac_legacy.c
index 76ed3b5fdd..2b8edcad9d 100644
--- a/providers/implementations/signature/mac_legacy.c
+++ b/providers/implementations/signature/mac_legacy.c
@@ -85,7 +85,6 @@ static int mac_digest_sign_init(void *vpmacctx, const char *mdname, void *vkey)
if (pmacctx == NULL || vkey == NULL || !mac_key_up_ref(vkey))
return 0;
-
mac_key_free(pmacctx->key);
pmacctx->key = vkey;
@@ -173,7 +172,7 @@ static void *mac_dupctx(void *vpmacctx)
}
#define MAC_SIGNATURE_FUNCTIONS(funcname) \
- const OSSL_DISPATCH mac_##funcname##_signature_functions[] = { \
+ const OSSL_DISPATCH mac_legacy_##funcname##_signature_functions[] = { \
{ OSSL_FUNC_SIGNATURE_NEWCTX, (void (*)(void))mac_##funcname##_newctx }, \
{ OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT, \
(void (*)(void))mac_digest_sign_init }, \