From f9ee633d33368ce9414c89dd9a0d774737ffa518 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 11 Apr 2019 21:22:52 +0200 Subject: [PATCH] Fix confusion between HMAC algorithm and the corresponding hash --- library/psa_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index f6b034e73..149d1354a 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -4052,7 +4052,7 @@ static psa_status_t psa_generator_hkdf_setup( psa_hkdf_generator_t *hkdf, psa_status_t status; status = psa_hmac_setup_internal( &hkdf->hmac, salt, salt_length, - PSA_ALG_HMAC_GET_HASH( hash_alg ) ); + hash_alg ); if( status != PSA_SUCCESS ) return( status ); status = psa_hash_update( &hkdf->hmac.hash_ctx, secret, secret_length ); @@ -4403,7 +4403,7 @@ static psa_status_t psa_hkdf_input( psa_hkdf_generator_t *hkdf, { status = psa_hmac_setup_internal( &hkdf->hmac, NULL, 0, - PSA_ALG_HMAC( hash_alg ) ); + hash_alg ); if( status != PSA_SUCCESS ) return( status ); hkdf->state = HKDF_STATE_STARTED;