Use macros in tests for PSA init/deinit routines

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2022-02-15 07:13:03 -05:00
parent 7db1b78fff
commit 853ad7bfcf

View file

@ -438,9 +438,7 @@ void pk_rsa_verify_ext_test_vec( data_t * message_str, int digest,
void *options;
size_t hash_len;
#if defined(MBEDTLS_USE_PSA_CRYPTO)
psa_crypto_init();
#endif
USE_PSA_INIT( );
mbedtls_pk_init( &pk );
memset( hash_result, 0x00, sizeof( hash_result ) );
@ -484,10 +482,7 @@ void pk_rsa_verify_ext_test_vec( data_t * message_str, int digest,
exit:
mbedtls_pk_free( &pk );
#if defined(MBEDTLS_USE_PSA_CRYPTO)
mbedtls_test_psa_purge_key_storage();
mbedtls_psa_crypto_free();
#endif
USE_PSA_DONE( );
}
/* END_CASE */