Correct switched blocks for output sizes

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott 2021-09-13 19:13:22 +01:00
parent b183d56b5f
commit 5a9642ff28

View File

@ -372,13 +372,13 @@ static int aead_multipart_internal_func( int key_type_arg, data_t *key_data,
if( is_encrypt )
{
final_output_size = PSA_AEAD_VERIFY_OUTPUT_SIZE( key_type, alg );
TEST_ASSERT( final_output_size <= PSA_AEAD_VERIFY_OUTPUT_MAX_SIZE );
final_output_size = PSA_AEAD_FINISH_OUTPUT_SIZE( key_type, alg );
TEST_ASSERT( final_output_size <= PSA_AEAD_FINISH_OUTPUT_MAX_SIZE );
}
else
{
final_output_size = PSA_AEAD_FINISH_OUTPUT_SIZE( key_type, alg );
TEST_ASSERT( final_output_size <= PSA_AEAD_FINISH_OUTPUT_MAX_SIZE );
final_output_size = PSA_AEAD_VERIFY_OUTPUT_SIZE( key_type, alg );
TEST_ASSERT( final_output_size <= PSA_AEAD_VERIFY_OUTPUT_MAX_SIZE );
}
ASSERT_ALLOC( final_data, final_output_size );