From 83f7108f3d8a1bb2e26013b35d03cb6823112b16 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 8 Apr 2022 16:18:14 +0200 Subject: [PATCH] Small DTLS 1.2 config: timing is a default entropy source Since MBEDTLS_TIMING_C is enabled, mbedtls_entropy_init() adds the weak source MBEDTLS_ENTROPY_MAX_SOURCES(). With mbedtls_platform_entropy_poll(), this makes two sources. The unit tests need room for a third source. Signed-off-by: Gilles Peskine --- configs/config-ccm-psk-dtls1_2.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/config-ccm-psk-dtls1_2.h b/configs/config-ccm-psk-dtls1_2.h index 75a92f540..9150e05db 100644 --- a/configs/config-ccm-psk-dtls1_2.h +++ b/configs/config-ccm-psk-dtls1_2.h @@ -89,10 +89,10 @@ /* * You should adjust this to the exact number of sources you're using: default - * is the "platform_entropy_poll" source, but you may want to add other ones - * Minimum is 2 for the entropy test suite. + * is the "platform_entropy_poll" source plus a weak clock source, but you may + * want to add other ones. Minimum is 3 for the entropy test suite. */ -#define MBEDTLS_ENTROPY_MAX_SOURCES 2 +#define MBEDTLS_ENTROPY_MAX_SOURCES 3 /* These defines are present so that the config modifying scripts can enable * them during tests/scripts/test-ref-configs.pl */