From eb48d3cbeb251229f39b1bc01cc944bd18d6b4f3 Mon Sep 17 00:00:00 2001 From: Oren Cohen Date: Wed, 13 Feb 2019 14:21:17 +0200 Subject: [PATCH] Clear ITS environment in psa entropy tests mbed_psa_reboot_and_request_new_security_state() API replaced its_reset() which is now a secure API only This change is necessary for a clean environment for the test --- TESTS/psa/entropy_inject/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TESTS/psa/entropy_inject/main.cpp b/TESTS/psa/entropy_inject/main.cpp index b6f155d9ab..080d6e4913 100644 --- a/TESTS/psa/entropy_inject/main.cpp +++ b/TESTS/psa/entropy_inject/main.cpp @@ -102,6 +102,9 @@ utest::v1::status_t greentea_test_setup(const size_t number_of_cases) seed[i] = i; } + psa_status_t status = mbed_psa_reboot_and_request_new_security_state(PSA_LIFECYCLE_ASSEMBLY_AND_TEST); + TEST_ASSERT_EQUAL(PSA_SUCCESS, status); + if (mbedtls_psa_inject_entropy(seed, MBEDTLS_ENTROPY_MAX_SEED_SIZE) == PSA_ERROR_NOT_SUPPORTED) { skip_tests = true; }