@@ -55,7 +55,7 @@ psa_status_t mbedtls_psa_external_get_random(
5555
5656#endif /* MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG */
5757
58- #if defined(MBEDTLS_PLATFORM_GET_ENTROPY_ALT ) || defined( MBEDTLS_PSA_DRIVER_GET_ENTROPY )
58+ #if defined(MBEDTLS_PSA_DRIVER_GET_ENTROPY )
5959
6060#include <test/random.h>
6161
@@ -130,7 +130,7 @@ static int fake_get_entropy(unsigned char *output, size_t output_size,
130130 return 0 ;
131131}
132132
133- #endif /* MBEDTLS_PLATFORM_GET_ENTROPY_ALT || MBEDTLS_PSA_DRIVER_GET_ENTROPY */
133+ #endif /* MBEDTLS_PSA_DRIVER_GET_ENTROPY */
134134
135135#if defined(MBEDTLS_PSA_DRIVER_GET_ENTROPY )
136136int mbedtls_platform_get_entropy (psa_driver_get_entropy_flags_t flags ,
@@ -145,18 +145,4 @@ int mbedtls_platform_get_entropy(psa_driver_get_entropy_flags_t flags,
145145 int ret = fake_get_entropy (output , output_size , estimate_bits );
146146 return ret ;
147147}
148- #elif defined(MBEDTLS_PLATFORM_GET_ENTROPY_ALT )
149- int mbedtls_platform_get_entropy (unsigned char * output , size_t output_size ,
150- size_t * output_len , size_t * entropy_content )
151- {
152- int ret = fake_get_entropy (output , output_size , entropy_content );
153- if (ret == 0 ) {
154- if (platform_get_entropy_forced_output_len == SIZE_MAX ) {
155- * output_len = output_size ;
156- } else {
157- * output_len = platform_get_entropy_forced_output_len ;
158- }
159- }
160- return ret ;
161- }
162- #endif /* MBEDTLS_PLATFORM_GET_ENTROPY_ALT */
148+ #endif /* MBEDTLS_PSA_DRIVER_GET_ENTROPY */
0 commit comments