diff --git a/tests/suites/test_suite_psa_crypto_init.function b/tests/suites/test_suite_psa_crypto_init.function index 5aa571d49..13dfd3366 100644 --- a/tests/suites/test_suite_psa_crypto_init.function +++ b/tests/suites/test_suite_psa_crypto_init.function @@ -95,10 +95,17 @@ static void custom_entropy_init( mbedtls_entropy_context *ctx ) #endif #if defined(MBEDTLS_ENTROPY_NV_SEED) if( custom_entropy_sources_mask & ENTROPY_SOURCE_NV_SEED ) + { mbedtls_entropy_add_source( ctx, mbedtls_nv_seed_poll, NULL, MBEDTLS_ENTROPY_BLOCK_SIZE, MBEDTLS_ENTROPY_SOURCE_STRONG ); - ctx->initial_entropy_run = 0; + ctx->initial_entropy_run = 0; + } + else + { + /* Skip the NV seed even though it's compiled in. */ + ctx->initial_entropy_run = 1; + } #endif if( custom_entropy_sources_mask & ENTROPY_SOURCE_FAKE )