mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-29 10:04:24 +01:00
Merge pull request #345 from gilles-peskine-arm/psa_mac_verify_finish-status
Fix possible error code mangling in psa_mac_verify_finish
This commit is contained in:
commit
b7000d4b2f
@ -3149,6 +3149,8 @@ psa_status_t psa_mac_verify_finish( psa_mac_operation_t *operation,
|
|||||||
|
|
||||||
status = psa_mac_finish_internal( operation,
|
status = psa_mac_finish_internal( operation,
|
||||||
actual_mac, sizeof( actual_mac ) );
|
actual_mac, sizeof( actual_mac ) );
|
||||||
|
if( status != PSA_SUCCESS )
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
if( safer_memcmp( mac, actual_mac, mac_length ) != 0 )
|
if( safer_memcmp( mac, actual_mac, mac_length ) != 0 )
|
||||||
status = PSA_ERROR_INVALID_SIGNATURE;
|
status = PSA_ERROR_INVALID_SIGNATURE;
|
||||||
|
Loading…
Reference in New Issue
Block a user