Require MESSAGE flag in PSA MAC setup.
@@ -2329,7 +2329,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;
@@ -2514,8 +2514,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;
