Enable HMAC-DRBG in driver-only hashes component
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
diff --git a/tests/suites/test_suite_hmac_drbg.function b/tests/suites/test_suite_hmac_drbg.function
index 830155a..0a50c6c 100644
--- a/tests/suites/test_suite_hmac_drbg.function
+++ b/tests/suites/test_suite_hmac_drbg.function
@@ -41,6 +41,8 @@
size_t default_entropy_len;
size_t expected_consumed_entropy = 0;
+ MD_PSA_INIT();
+
mbedtls_hmac_drbg_init(&ctx);
memset(buf, 0, sizeof(buf));
memset(out, 0, sizeof(out));
@@ -118,6 +120,7 @@
exit:
mbedtls_hmac_drbg_free(&ctx);
+ MD_PSA_DONE();
}
/* END_CASE */
@@ -127,6 +130,8 @@
const mbedtls_md_info_t *md_info;
mbedtls_hmac_drbg_context ctx;
+ MD_PSA_INIT();
+
mbedtls_hmac_drbg_init(&ctx);
md_info = mbedtls_md_info_from_type(md_alg);
@@ -141,6 +146,7 @@
exit:
mbedtls_hmac_drbg_free(&ctx);
+ MD_PSA_DONE();
}
/* END_CASE */
@@ -153,6 +159,8 @@
mbedtls_hmac_drbg_context ctx;
size_t i;
+ MD_PSA_INIT();
+
mbedtls_hmac_drbg_init(&ctx);
memset(buf, 0, sizeof(buf));
memset(out, 0, sizeof(out));
@@ -171,6 +179,7 @@
exit:
mbedtls_hmac_drbg_free(&ctx);
+ MD_PSA_DONE();
}
/* END_CASE */
@@ -185,6 +194,8 @@
const mbedtls_md_info_t *md_info;
mbedtls_hmac_drbg_context ctx;
+ MD_PSA_INIT();
+
mbedtls_hmac_drbg_init(&ctx);
p_entropy.p = entropy->x;
@@ -219,6 +230,7 @@
exit:
mbedtls_hmac_drbg_free(&ctx);
+ MD_PSA_DONE();
}
/* END_CASE */
@@ -232,6 +244,8 @@
const mbedtls_md_info_t *md_info;
mbedtls_hmac_drbg_context ctx;
+ MD_PSA_INIT();
+
mbedtls_hmac_drbg_init(&ctx);
p_entropy.p = entropy->x;
@@ -252,6 +266,7 @@
exit:
mbedtls_hmac_drbg_free(&ctx);
+ MD_PSA_DONE();
}
/* END_CASE */
@@ -264,6 +279,8 @@
const mbedtls_md_info_t *md_info;
mbedtls_hmac_drbg_context ctx;
+ MD_PSA_INIT();
+
mbedtls_hmac_drbg_init(&ctx);
p_entropy.p = entropy->x;
@@ -284,12 +301,18 @@
exit:
mbedtls_hmac_drbg_free(&ctx);
+ MD_PSA_DONE();
}
/* END_CASE */
/* BEGIN_CASE depends_on:MBEDTLS_SELF_TEST */
void hmac_drbg_selftest()
{
+ MD_PSA_INIT();
+
TEST_ASSERT(mbedtls_hmac_drbg_self_test(1) == 0);
+
+exit:
+ MD_PSA_DONE();
}
/* END_CASE */