From db1f13b8f4a78111a6b325437a54ee3213ac5109 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 8 Jul 2025 17:44:09 +0200 Subject: [PATCH] Rename entropy_content to estimate_bits Align terminology with the PSA driver specification draft. Signed-off-by: Gilles Peskine --- tests/src/fake_external_rng_for_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/src/fake_external_rng_for_test.c b/tests/src/fake_external_rng_for_test.c index d6bb0770a..d8905708d 100644 --- a/tests/src/fake_external_rng_for_test.c +++ b/tests/src/fake_external_rng_for_test.c @@ -90,7 +90,7 @@ size_t mbedtls_test_platform_get_entropy_get_call_count() } static int fake_get_entropy(unsigned char *output, size_t output_size, - size_t *entropy_content) + size_t *estimate_bits) { platform_get_entropy_call_count++; @@ -110,11 +110,11 @@ static int fake_get_entropy(unsigned char *output, size_t output_size, mbedtls_test_rnd_std_rand(NULL, output, output_size); - if (entropy_content != NULL) { + if (estimate_bits != NULL) { if (platform_get_entropy_forced_entropy_content < SIZE_MAX) { - *entropy_content = platform_get_entropy_forced_entropy_content; + *estimate_bits = platform_get_entropy_forced_entropy_content; } else { - *entropy_content = output_size * 8; + *estimate_bits = output_size * 8; } } @@ -146,9 +146,9 @@ int mbedtls_platform_get_entropy(unsigned char *output, size_t output_size, #if defined(MBEDTLS_PSA_DRIVER_GET_ENTROPY) int mbedtls_platform_get_entropy(unsigned char *output, size_t output_size, - size_t *entropy_content) + size_t *estimate_bits) { - int ret = fake_get_entropy(output, output_size, entropy_content); + int ret = fake_get_entropy(output, output_size, estimate_bits); return ret; } #endif /* MBEDTLS_PSA_DRIVER_GET_ENTROPY */