mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-09-24 11:07:22 +00:00
Fix negation that broke psa_random_set_prediction_resistance
Platform entropy is available when `MBEDTLS_NO_PLATFORM_ENTROPY` is _not_ defined. This caused the ok/not-supported behavior of `broke psa_random_set_prediction_resistance() to be inverted, and the unit tests checking that behavior to be similarly inverted, so the unit tests didn't catch it. Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
@@ -59,14 +59,14 @@
|
||||
#define MBEDTLS_ENTROPY_HARDWARE_ALT_DEFINED 0
|
||||
#endif
|
||||
#if defined(MBEDTLS_NO_PLATFORM_ENTROPY)
|
||||
#define MBEDTLS_PLATFORM_ENTROPY_DEFINED 1
|
||||
#define MBEDTLS_PLATFORM_ENTROPY_ENABLED 0
|
||||
#else
|
||||
#define MBEDTLS_PLATFORM_ENTROPY_DEFINED 0
|
||||
#define MBEDTLS_PLATFORM_ENTROPY_ENABLED 1
|
||||
#endif
|
||||
|
||||
#define MBEDTLS_ENTROPY_TRUE_SOURCES ( \
|
||||
MBEDTLS_ENTROPY_HARDWARE_ALT_DEFINED + \
|
||||
MBEDTLS_PLATFORM_ENTROPY_DEFINED + \
|
||||
MBEDTLS_PLATFORM_ENTROPY_ENABLED + \
|
||||
0)
|
||||
|
||||
/* Whether there is at least one entropy source for the entropy module.
|
||||
|
||||
Reference in New Issue
Block a user