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
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue