test/pkcs7: Add init for PSA tests
Initialize the PSA subsystem in the test functions.
Signed-off-by: Nick Child <nick.child@ibm.com>
diff --git a/tests/suites/test_suite_pkcs7.function b/tests/suites/test_suite_pkcs7.function
index 8b35c57..01edadb 100644
--- a/tests/suites/test_suite_pkcs7.function
+++ b/tests/suites/test_suite_pkcs7.function
@@ -200,6 +200,8 @@
mbedtls_pkcs7 pkcs7;
mbedtls_x509_crt x509;
+ USE_PSA_INIT();
+
mbedtls_pkcs7_init( &pkcs7 );
mbedtls_x509_crt_init( &x509 );
@@ -233,6 +235,7 @@
mbedtls_x509_crt_free( &x509 );
mbedtls_free( data );
mbedtls_pkcs7_free( &pkcs7 );
+ USE_PSA_DONE();
}
/* END_CASE */
@@ -253,6 +256,8 @@
mbedtls_pkcs7 pkcs7;
mbedtls_x509_crt x509;
+ USE_PSA_INIT();
+
mbedtls_pkcs7_init( &pkcs7 );
mbedtls_x509_crt_init( &x509 );
@@ -296,6 +301,7 @@
mbedtls_free( data );
mbedtls_pkcs7_free( &pkcs7 );
mbedtls_free( pkcs7_buf );
+ USE_PSA_DONE();
}
/* END_CASE */
@@ -313,6 +319,8 @@
mbedtls_pkcs7 pkcs7;
mbedtls_x509_crt x509;
+ USE_PSA_INIT();
+
mbedtls_pkcs7_init( &pkcs7 );
mbedtls_x509_crt_init( &x509 );
@@ -346,6 +354,7 @@
mbedtls_free( data );
mbedtls_pkcs7_free( &pkcs7 );
mbedtls_free( pkcs7_buf );
+ USE_PSA_DONE();
}
/* END_CASE */
@@ -363,6 +372,8 @@
mbedtls_pkcs7 pkcs7;
mbedtls_x509_crt x509;
+ USE_PSA_INIT();
+
mbedtls_pkcs7_init( &pkcs7 );
mbedtls_x509_crt_init( &x509 );
@@ -396,6 +407,7 @@
mbedtls_pkcs7_free( &pkcs7 );
mbedtls_free( data );
mbedtls_free( pkcs7_buf );
+ USE_PSA_DONE();
}
/* END_CASE */