diff --git a/tests/include/test/fake_external_rng_for_test.h b/tests/include/test/fake_external_rng_for_test.h index f5aa86e92..330399908 100644 --- a/tests/include/test/fake_external_rng_for_test.h +++ b/tests/include/test/fake_external_rng_for_test.h @@ -41,16 +41,16 @@ void mbedtls_test_disable_insecure_external_rng(void); #include -/* Force return value or entropy content in mbedtls_platform_get_entropy_alt() +/* Force return value or entropy content in mbedtls_platform_get_entropy() * as follows: * - if fail == 0 && forced_entropy_content == 0 then - * mbedtls_platform_get_entropy_alt() behaves properly. + * mbedtls_platform_get_entropy() behaves properly. * - if fail != 0 then MBEDTLS_ERR_ENTROPY_SOURCE_FAILED is returned. * - if forced_entropy_content != 0 then * - return value is success (0) but * - returned entropy_content will be equal to forced_entropy_content. */ -void mbedtls_test_get_entropy_alt_force(int fail, size_t forced_entropy_content); +void mbedtls_test_get_entropy_force(int fail, size_t forced_entropy_content); #endif /* MBEDTLS_PLATFORM_GET_ENTROPY_ALT */ diff --git a/tests/src/fake_external_rng_for_test.c b/tests/src/fake_external_rng_for_test.c index d766af164..f00cb07ba 100644 --- a/tests/src/fake_external_rng_for_test.c +++ b/tests/src/fake_external_rng_for_test.c @@ -2,7 +2,7 @@ * * Helper functions to test external functions: * - mbedtls_psa_external_get_random() - * - mbedtls_platform_get_entropy_alt() + * - mbedtls_platform_get_entropy() * * These functions are provided only for test purposes and they should not be * used for production. @@ -59,14 +59,14 @@ psa_status_t mbedtls_psa_external_get_random( static int get_entropy_alt_force_failure = 0; static size_t get_entropy_alt_forced_entropy_content = 0; -void mbedtls_test_get_entropy_alt_force(int fail, size_t forced_entropy_content) +void mbedtls_test_get_entropy_force(int fail, size_t forced_entropy_content) { get_entropy_alt_force_failure = fail; get_entropy_alt_forced_entropy_content = forced_entropy_content; } -int mbedtls_platform_get_entropy_alt(unsigned char *output, size_t output_size, - size_t *output_len, size_t *entropy_content) +int mbedtls_platform_get_entropy(unsigned char *output, size_t output_size, + size_t *output_len, size_t *entropy_content) { if (get_entropy_alt_force_failure != 0) { return MBEDTLS_ERR_ENTROPY_SOURCE_FAILED;