mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 16:55:43 +01:00
Add missing cleanup to some multipart operation tests
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
a09713c795
commit
64f13ef6ab
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user