From: Pauli Date: Mon, 9 Sep 2019 01:42:00 +0000 (+1000) Subject: Register KDF's using their name macros rather than strings X-Git-Tag: openssl-3.0.0-alpha1~1397 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=69333af49d8ddba6b551506ddbbccea73aee4a6b;p=oweals%2Fopenssl.git Register KDF's using their name macros rather than strings Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/9814) --- diff --git a/providers/default/defltprov.c b/providers/default/defltprov.c index 9ce918aea5..3f2ad610a9 100644 --- a/providers/default/defltprov.c +++ b/providers/default/defltprov.c @@ -212,17 +212,17 @@ static const OSSL_ALGORITHM deflt_macs[] = { }; static const OSSL_ALGORITHM deflt_kdfs[] = { - { "HKDF", "default=yes", kdf_hkdf_functions }, - { "SSKDF", "default=yes", kdf_sskdf_functions }, - { "PBKDF2", "default=yes", kdf_pbkdf2_functions }, - { "SSHKDF", "default=yes", kdf_sshkdf_functions }, - { "X963KDF", "default=yes", kdf_x963_kdf_functions }, - { "TLS1-PRF", "default=yes", kdf_tls1_prf_functions }, + { OSSL_KDF_NAME_HKDF, "default=yes", kdf_hkdf_functions }, + { OSSL_KDF_NAME_SSKDF, "default=yes", kdf_sskdf_functions }, + { OSSL_KDF_NAME_PBKDF2, "default=yes", kdf_pbkdf2_functions }, + { OSSL_KDF_NAME_SSHKDF, "default=yes", kdf_sshkdf_functions }, + { OSSL_KDF_NAME_X963KDF, "default=yes", kdf_x963_kdf_functions }, + { OSSL_KDF_NAME_TLS1_PRF, "default=yes", kdf_tls1_prf_functions }, #ifndef OPENSSL_NO_CMS - { "X942KDF", "default=yes", kdf_x942_kdf_functions }, + { OSSL_KDF_NAME_X942KDF, "default=yes", kdf_x942_kdf_functions }, #endif #ifndef OPENSSL_NO_SCRYPT - { "id-scrypt", "default=yes", kdf_scrypt_functions }, + { OSSL_KDF_NAME_SCRYPT, "default=yes", kdf_scrypt_functions }, #endif { NULL, NULL, NULL } }; diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c index 98ec491458..e5bb9b41d6 100644 --- a/providers/fips/fipsprov.c +++ b/providers/fips/fipsprov.c @@ -346,10 +346,10 @@ static const OSSL_ALGORITHM fips_macs[] = { }; static const OSSL_ALGORITHM fips_kdfs[] = { - { "HKDF", "fips=yes", kdf_hkdf_functions }, - { "SSKDF", "fips=yes", kdf_sskdf_functions }, - { "PBKDF2", "fips=yes", kdf_pbkdf2_functions }, - { "TLS1-PRF", "fips=yes", kdf_tls1_prf_functions }, + { OSSL_KDF_NAME_HKDF, "fips=yes", kdf_hkdf_functions }, + { OSSL_KDF_NAME_SSKDF, "fips=yes", kdf_sskdf_functions }, + { OSSL_KDF_NAME_PBKDF2, "fips=yes", kdf_pbkdf2_functions }, + { OSSL_KDF_NAME_TLS1_PRF, "fips=yes", kdf_tls1_prf_functions }, { NULL, NULL, NULL } };