Fix usage of TEST_ASSERT
Add missing == PSA_SUCCESS in TEST_ASSERT usage
diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function
index 4721c87..6376e56 100755
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -591,7 +591,7 @@
unsigned char *output_data2 = NULL;
size_t output_length2;
psa_status_t actual_status;
- uint8_t* nonce = NULL;
+ uint8_t nonce[16];
size_t nonce_length = 16;
size_t tag_length = 16;
@@ -606,8 +606,7 @@
{
nonce_length = 12;
}
- nonce = mbedtls_calloc( 1, nonce_length );
- TEST_ASSERT( nonce != NULL );
+
for( int i = 0; i < nonce_length; ++nonce_length )
nonce[i] = i;
@@ -620,7 +619,7 @@
nonce, nonce_length,
additional_data, additional_data_length,
input_data, input_size, output_data,
- input_size, &output_length ) );
+ input_size, &output_length ) == PSA_SUCCESS );
output_data2 = mbedtls_calloc( 1, output_length );
TEST_ASSERT( output_data2 != NULL );
@@ -629,7 +628,7 @@
nonce, nonce_length,
additional_data, additional_data_length,
output_data, output_length - tag_length, output_data2,
- output_length, &output_length2 ) );
+ output_length, &output_length2 ) == PSA_SUCCESS );
TEST_ASSERT( memcmp( input, output_data2,
input_size ) == 0 );