mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-24 08:46:48 +00:00
Use psa_hash_compute in psa_hmac_setup_internal
This commit is contained in:
parent
7b8efaffaa
commit
84b8fc8213
|
@ -2737,14 +2737,8 @@ static psa_status_t psa_hmac_setup_internal( psa_hmac_internal_data *hmac,
|
||||||
|
|
||||||
if( key_length > block_size )
|
if( key_length > block_size )
|
||||||
{
|
{
|
||||||
status = psa_hash_setup( &hmac->hash_ctx, hash_alg );
|
status = psa_hash_compute( hash_alg, key, key_length,
|
||||||
if( status != PSA_SUCCESS )
|
ipad, sizeof( ipad ), &key_length );
|
||||||
goto cleanup;
|
|
||||||
status = psa_hash_update( &hmac->hash_ctx, key, key_length );
|
|
||||||
if( status != PSA_SUCCESS )
|
|
||||||
goto cleanup;
|
|
||||||
status = psa_hash_finish( &hmac->hash_ctx,
|
|
||||||
ipad, sizeof( ipad ), &key_length );
|
|
||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue