aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Peskine <Gilles.Peskine@arm.com>2020-08-25 23:15:20 +0200
committerGilles Peskine <Gilles.Peskine@arm.com>2020-08-26 00:11:23 +0200
commit64f13ef6ab5f642f597ff45252cfc008e2d51673 (patch)
treea3db505d476fed139e31397be127e4bbd6c61430
parenta09713c7956b300382e5ce4b7cea3b08cf5553e4 (diff)
downloadmbed-tls-64f13ef6ab5f642f597ff45252cfc008e2d51673.tar.gz
Add missing cleanup to some multipart operation tests
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
-rw-r--r--tests/suites/test_suite_psa_crypto.function12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function
index f4b9a8f67..635114137 100644
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -3066,6 +3066,7 @@ void mac_sign( int key_type_arg,
sizeof( actual_mac ) - mac_length ) );
exit:
+ psa_mac_abort( &operation );
psa_destroy_key( handle );
PSA_DONE( );
}
@@ -3104,6 +3105,7 @@ void mac_verify( int key_type_arg,
expected_mac->len ) );
exit:
+ psa_mac_abort( &operation );
psa_destroy_key( handle );
PSA_DONE( );
}
@@ -3183,6 +3185,7 @@ void cipher_setup( int key_type_arg,
#endif
exit:
+ psa_cipher_abort( &operation );
PSA_DONE( );
}
/* END_CASE */
@@ -3335,6 +3338,7 @@ void cipher_bad_order( )
PSA_ASSERT( psa_destroy_key( handle ) );
exit:
+ psa_cipher_abort( &operation );
PSA_DONE( );
}
/* END_CASE */
@@ -3393,6 +3397,7 @@ void cipher_encrypt( int alg_arg, int key_type_arg,
}
exit:
+ psa_cipher_abort( &operation );
mbedtls_free( output );
psa_destroy_key( handle );
PSA_DONE( );
@@ -3461,6 +3466,7 @@ void cipher_encrypt_multipart( int alg_arg, int key_type_arg,
output, total_output_length );
exit:
+ psa_cipher_abort( &operation );
mbedtls_free( output );
psa_destroy_key( handle );
PSA_DONE( );
@@ -3532,6 +3538,7 @@ void cipher_decrypt_multipart( int alg_arg, int key_type_arg,
output, total_output_length );
exit:
+ psa_cipher_abort( &operation );
mbedtls_free( output );
psa_destroy_key( handle );
PSA_DONE( );
@@ -3593,6 +3600,7 @@ void cipher_decrypt( int alg_arg, int key_type_arg,
}
exit:
+ psa_cipher_abort( &operation );
mbedtls_free( output );
psa_destroy_key( handle );
PSA_DONE( );
@@ -3674,6 +3682,8 @@ void cipher_verify_output( int alg_arg, int key_type_arg,
ASSERT_COMPARE( input->x, input->len, output2, output2_length );
exit:
+ psa_cipher_abort( &operation1 );
+ psa_cipher_abort( &operation2 );
mbedtls_free( output1 );
mbedtls_free( output2 );
psa_destroy_key( handle );
@@ -3777,6 +3787,8 @@ void cipher_verify_output_multipart( int alg_arg,
ASSERT_COMPARE( input->x, input->len, output2, output2_length );
exit:
+ psa_cipher_abort( &operation1 );
+ psa_cipher_abort( &operation2 );
mbedtls_free( output1 );
mbedtls_free( output2 );
psa_destroy_key( handle );