mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-08-12 14:17:47 +00:00
Provide the new entropy callback
Provide the new interface for `mbedtls_platform_get_entropy()` requested in https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/307 when `MBEDTLS_PSA_DRIVER_GET_ENTROPY` is enabled. Keep providing the old interface when `MBEDTLS_PLATFORM_GET_ENTROPY_ALT` is enabled. For now, the new interface is identical to the old one. Subsequent commits will change the interface. Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
@@ -37,7 +37,7 @@ void mbedtls_test_enable_insecure_external_rng(void);
|
||||
void mbedtls_test_disable_insecure_external_rng(void);
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG */
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_GET_ENTROPY_ALT)
|
||||
#if defined(MBEDTLS_PLATFORM_GET_ENTROPY_ALT) || defined(MBEDTLS_PSA_DRIVER_GET_ENTROPY)
|
||||
|
||||
#include <mbedtls/platform.h>
|
||||
|
||||
@@ -73,6 +73,6 @@ void mbedtls_test_platform_get_entropy_set_entropy_content(size_t val);
|
||||
/* Return the number of times mbedtls_platform_get_entropy() was called. */
|
||||
size_t mbedtls_test_platform_get_entropy_get_call_count(void);
|
||||
|
||||
#endif /* MBEDTLS_PLATFORM_GET_ENTROPY_ALT */
|
||||
#endif /* MBEDTLS_PLATFORM_GET_ENTROPY_ALT || MBEDTLS_PSA_DRIVER_GET_ENTROPY */
|
||||
|
||||
#endif /* FAKE_EXTERNAL_RNG_FOR_TEST_H */
|
||||
|
||||
Reference in New Issue
Block a user