CryptoPkg: Add HMAC algorithms for signature/keymgmt

Some parts and versions of TLS require HMAC. This adds the missing HMAC
algorithms to the UEFI provider. One entry in the default signature
algorithms and one in the key management algorithms.

Source of these entries is the default OpenSSL provider, defltprov.c,
included in the OpenSSL library.

This change was required to connect to some TLS servers depending
on the used ciphers.

Signed-off-by: Sebastian Witt <sebastian.witt@siemens.com>
This commit is contained in:
Sebastian Witt 2024-09-25 14:24:25 +02:00 committed by mergify[bot]
parent 8b87eb9dfb
commit 7c1562f03c

View File

@ -193,6 +193,7 @@ static const OSSL_ALGORITHM deflt_signature[] = {
#ifndef OPENSSL_NO_EC
{ PROV_NAMES_ECDSA, "provider=default", ossl_ecdsa_signature_functions },
#endif
{ PROV_NAMES_HMAC, "provider=default", ossl_mac_legacy_hmac_signature_functions },
{ NULL, NULL, NULL }
};
@ -222,6 +223,8 @@ static const OSSL_ALGORITHM deflt_keymgmt[] = {
PROV_DESCS_TLS1_PRF_SIGN },
{ PROV_NAMES_HKDF, "provider=default", ossl_kdf_keymgmt_functions,
PROV_DESCS_HKDF_SIGN },
{ PROV_NAMES_HMAC, "provider=default", ossl_mac_legacy_keymgmt_functions,
PROV_DESCS_HMAC_SIGN },
{ NULL, NULL, NULL }
};