Add PSA initialization and teardown to tests using pkcs5
If PSA is defined and there is no MD - an initialization
is required.
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 0a77988..1e003b9 100644
--- a/tests/suites/test_suite_pkparse.function
+++ b/tests/suites/test_suite_pkparse.function
@@ -17,6 +17,7 @@
int res;
char *pwd = password;
+ PSA_INIT();
mbedtls_pk_init( &ctx );
if( strcmp( pwd, "NULL" ) == 0 )
@@ -37,6 +38,7 @@
exit:
mbedtls_pk_free( &ctx );
+ PSA_DONE();
}
/* END_CASE */
@@ -46,6 +48,7 @@
mbedtls_pk_context ctx;
int res;
+ PSA_INIT();
mbedtls_pk_init( &ctx );
res = mbedtls_pk_parse_public_keyfile( &ctx, key_file );
@@ -62,6 +65,7 @@
exit:
mbedtls_pk_free( &ctx );
+ PSA_DONE();
}
/* END_CASE */