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:
Gilles Peskine
2026-03-15 19:32:39 +01:00
parent 9d17d28dda
commit 909055d760
@@ -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.