mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-27 06:35:22 +00:00
Correct switched blocks for output sizes
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
b183d56b5f
commit
5a9642ff28
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user