Setup / deinitialize PSA in pk tests only if no MD is used

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
diff --git a/tests/suites/test_suite_pkparse.function b/tests/suites/test_suite_pkparse.function
index 1e003b9..8ca3aca 100644
--- a/tests/suites/test_suite_pkparse.function
+++ b/tests/suites/test_suite_pkparse.function
@@ -17,7 +17,7 @@
     int res;
     char *pwd = password;
 
-    PSA_INIT();
+    PSA_INIT_IF_NO_MD();
     mbedtls_pk_init( &ctx );
 
     if( strcmp( pwd, "NULL" ) == 0 )
@@ -38,7 +38,7 @@
 
 exit:
     mbedtls_pk_free( &ctx );
-    PSA_DONE();
+    PSA_DONE_IF_NO_MD();
 }
 /* END_CASE */
 
@@ -48,7 +48,7 @@
     mbedtls_pk_context ctx;
     int res;
 
-    PSA_INIT();
+    PSA_INIT_IF_NO_MD();
     mbedtls_pk_init( &ctx );
 
     res = mbedtls_pk_parse_public_keyfile( &ctx, key_file );
@@ -65,7 +65,7 @@
 
 exit:
     mbedtls_pk_free( &ctx );
-    PSA_DONE();
+    PSA_DONE_IF_NO_MD();
 }
 /* END_CASE */