mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 02:45:41 +01:00
Require MESSAGE flag in PSA MAC setup.
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
This commit is contained in:
parent
186c0216b0
commit
dd55b25bd5
@ -2398,7 +2398,7 @@ static psa_status_t psa_mac_setup( psa_mac_operation_t *operation,
|
||||
status = psa_get_and_lock_key_slot_with_policy(
|
||||
key,
|
||||
&slot,
|
||||
is_sign ? PSA_KEY_USAGE_SIGN_HASH : PSA_KEY_USAGE_VERIFY_HASH,
|
||||
is_sign ? PSA_KEY_USAGE_SIGN_MESSAGE : PSA_KEY_USAGE_VERIFY_MESSAGE,
|
||||
alg );
|
||||
if( status != PSA_SUCCESS )
|
||||
goto exit;
|
||||
@ -2583,8 +2583,9 @@ static psa_status_t psa_mac_compute_internal( mbedtls_svc_key_id_t key,
|
||||
uint8_t operation_mac_size = 0;
|
||||
|
||||
status = psa_get_and_lock_key_slot_with_policy(
|
||||
key, &slot,
|
||||
is_sign ? PSA_KEY_USAGE_SIGN_HASH : PSA_KEY_USAGE_VERIFY_HASH,
|
||||
key,
|
||||
&slot,
|
||||
is_sign ? PSA_KEY_USAGE_SIGN_MESSAGE : PSA_KEY_USAGE_VERIFY_MESSAGE,
|
||||
alg );
|
||||
if( status != PSA_SUCCESS )
|
||||
goto exit;
|
||||
|
Loading…
Reference in New Issue
Block a user