Skip to content

Commit db1f13b

Browse files
Rename entropy_content to estimate_bits
Align terminology with the PSA driver specification draft. Signed-off-by: Gilles Peskine <[email protected]>
1 parent 2a97347 commit db1f13b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/src/fake_external_rng_for_test.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ size_t mbedtls_test_platform_get_entropy_get_call_count()
9090
}
9191

9292
static int fake_get_entropy(unsigned char *output, size_t output_size,
93-
size_t *entropy_content)
93+
size_t *estimate_bits)
9494
{
9595
platform_get_entropy_call_count++;
9696

@@ -110,11 +110,11 @@ static int fake_get_entropy(unsigned char *output, size_t output_size,
110110

111111
mbedtls_test_rnd_std_rand(NULL, output, output_size);
112112

113-
if (entropy_content != NULL) {
113+
if (estimate_bits != NULL) {
114114
if (platform_get_entropy_forced_entropy_content < SIZE_MAX) {
115-
*entropy_content = platform_get_entropy_forced_entropy_content;
115+
*estimate_bits = platform_get_entropy_forced_entropy_content;
116116
} else {
117-
*entropy_content = output_size * 8;
117+
*estimate_bits = output_size * 8;
118118
}
119119
}
120120

@@ -146,9 +146,9 @@ int mbedtls_platform_get_entropy(unsigned char *output, size_t output_size,
146146

147147
#if defined(MBEDTLS_PSA_DRIVER_GET_ENTROPY)
148148
int mbedtls_platform_get_entropy(unsigned char *output, size_t output_size,
149-
size_t *entropy_content)
149+
size_t *estimate_bits)
150150
{
151-
int ret = fake_get_entropy(output, output_size, entropy_content);
151+
int ret = fake_get_entropy(output, output_size, estimate_bits);
152152
return ret;
153153
}
154154
#endif /* MBEDTLS_PSA_DRIVER_GET_ENTROPY */

0 commit comments

Comments
 (0)