mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 11:35:44 +01:00
Test PSA_MAC_FINAL_SIZE in mac_sign exactly
We expect PSA_MAC_FINAL_SIZE to be exact in this implementation, so check it here. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
ed19762a22
commit
3d404d677e
@ -3038,7 +3038,8 @@ void mac_sign( int key_type_arg,
|
||||
|
||||
memset( actual_mac, '+', sizeof( actual_mac ) );
|
||||
TEST_ASSERT( mac_buffer_size <= PSA_MAC_MAX_SIZE );
|
||||
TEST_ASSERT( expected_mac->len <= mac_buffer_size );
|
||||
/* We expect PSA_MAC_FINAL_SIZE to be exact. */
|
||||
TEST_ASSERT( expected_mac->len == mac_buffer_size );
|
||||
|
||||
PSA_ASSERT( psa_crypto_init( ) );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user