diff --git a/tests/suites/test_suite_pk.function b/tests/suites/test_suite_pk.function index 237a8095d..bc0334e3c 100644 --- a/tests/suites/test_suite_pk.function +++ b/tests/suites/test_suite_pk.function @@ -345,6 +345,8 @@ void mbedtls_pk_check_pair( char * pub_file, char * prv_file, int ret ) { mbedtls_pk_context pub, prv, alt; + USE_PSA_INIT(); + mbedtls_pk_init( &pub ); mbedtls_pk_init( &prv ); mbedtls_pk_init( &alt ); @@ -373,6 +375,7 @@ void mbedtls_pk_check_pair( char * pub_file, char * prv_file, int ret ) mbedtls_pk_free( &pub ); mbedtls_pk_free( &prv ); mbedtls_pk_free( &alt ); + USE_PSA_DONE(); } /* END_CASE */ @@ -395,6 +398,8 @@ void pk_rsa_verify_test_vec( data_t * message_str, int digest, int mod, mbedtls_ecp_set_max_ops( 1 ); #endif + USE_PSA_INIT(); + mbedtls_pk_init( &pk ); memset( hash_result, 0x00, MBEDTLS_MD_MAX_SIZE ); @@ -421,6 +426,7 @@ exit: mbedtls_pk_restart_free( rs_ctx ); #endif mbedtls_pk_free( &pk ); + USE_PSA_DONE(); } /* END_CASE */ @@ -530,6 +536,8 @@ void pk_sign_verify_restart( int pk_type, int grp_id, char *d_str, size_t hlen, slen; const mbedtls_md_info_t *md_info; + USE_PSA_INIT(); + mbedtls_pk_restart_init( &rs_ctx ); mbedtls_pk_init( &prv ); mbedtls_pk_init( &pub ); @@ -617,6 +625,7 @@ exit: mbedtls_pk_restart_free( &rs_ctx ); mbedtls_pk_free( &prv ); mbedtls_pk_free( &pub ); + USE_PSA_DONE(); } /* END_CASE */