From a57267c758b4db66576a8ce687e25b26bab4b6d3 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Wed, 31 Aug 2022 15:09:19 -0400 Subject: [PATCH] Add a possibility to call PSA_INIT without MBEDTLS_PSA_CRYPTO_C Signed-off-by: Andrzej Kurek --- tests/include/test/psa_crypto_helpers.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/include/test/psa_crypto_helpers.h b/tests/include/test/psa_crypto_helpers.h index 6f42882646..43023452f9 100644 --- a/tests/include/test/psa_crypto_helpers.h +++ b/tests/include/test/psa_crypto_helpers.h @@ -276,6 +276,12 @@ psa_key_usage_t mbedtls_test_update_key_usage_flags( psa_key_usage_t usage_flags } \ } \ while( 0 ) +#else +/* Define empty macros so that we can use them in the preamble and teardown + * of every test function that uses PSA conditionally based on + * MBEDTLS_PSA_CRYPTO_C. */ +#define PSA_INIT( ) ( (void) 0 ) +#define PSA_DONE( ) ( (void) 0 ) #endif /* MBEDTLS_PSA_CRYPTO_C */