diff --git a/tests/suites/test_suite_random.function b/tests/suites/test_suite_random.function index 3026bae0e..0df92b044 100644 --- a/tests/suites/test_suite_random.function +++ b/tests/suites/test_suite_random.function @@ -26,6 +26,8 @@ void random_twice_with_ctr_drbg() unsigned char output1[OUTPUT_SIZE]; unsigned char output2[OUTPUT_SIZE]; + MD_PSA_INIT(); + /* First round */ mbedtls_entropy_init(&entropy); mbedtls_ctr_drbg_init(&drbg); @@ -54,6 +56,7 @@ void random_twice_with_ctr_drbg() exit: mbedtls_ctr_drbg_free(&drbg); mbedtls_entropy_free(&entropy); + MD_PSA_DONE(); } /* END_CASE */ @@ -66,6 +69,8 @@ void random_twice_with_hmac_drbg(int md_type) unsigned char output2[OUTPUT_SIZE]; const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type(md_type); + MD_PSA_INIT(); + /* First round */ mbedtls_entropy_init(&entropy); mbedtls_hmac_drbg_init(&drbg); @@ -94,6 +99,7 @@ void random_twice_with_hmac_drbg(int md_type) exit: mbedtls_hmac_drbg_free(&drbg); mbedtls_entropy_free(&entropy); + MD_PSA_DONE(); } /* END_CASE */