File tree Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,21 @@ add_code
5555 " \n" \
5656 " #else\n"
5757
58- add_code \
59- " #include \" check_config.h\" \n" \
60- " \n" \
61- " #endif \/* !MBEDTLS_ENTROPY_HARDWARE_ALT && !MBEDTLS_TEST_NULL_ENTROPY *\/"
58+ add_code \
59+ " #include \" check_config.h\" \n" \
60+ " \n" \
61+ " #endif \/* !MBEDTLS_ENTROPY_HARDWARE_ALT && !MBEDTLS_TEST_NULL_ENTROPY *\/\n" \
62+ " \n" \
63+ " #if defined(MBEDTLS_TEST_NULL_ENTROPY)\n" \
64+ " #warning \" MBEDTLS_TEST_NULL_ENTROPY has been enabled. This \" \\\\ \n" \
65+ " \" configuration is not secure and is not suitable for production use\" \n" \
66+ " #endif\n" \
67+ " \n" \
68+ " #if defined(MBEDTLS_SSL_TLS_C) && !defined(MBEDTLS_TEST_NULL_ENTROPY) && \\\\ \n" \
69+ " !defined(MBEDTLS_ENTROPY_HARDWARE_ALT)\n" \
70+ " #error \" No entropy source was found at build time, so TLS \" \\\\ \n" \
71+ " \" functionality is not available\" \n" \
72+ " #endif\n"
6273
6374# not supported on mbed OS, nor used by mbed Client
6475conf unset MBEDTLS_NET_C
Original file line number Diff line number Diff line change 26132613#include "check_config.h"
26142614
26152615#endif /* !MBEDTLS_ENTROPY_HARDWARE_ALT && !MBEDTLS_TEST_NULL_ENTROPY */
2616+
2617+ #if defined(MBEDTLS_TEST_NULL_ENTROPY )
2618+ #warning "MBEDTLS_TEST_NULL_ENTROPY has been enabled. This " \
2619+ "configuration is not secure and is not suitable for production use"
2620+ #endif
2621+
2622+ #if defined(MBEDTLS_SSL_TLS_C ) && !defined(MBEDTLS_TEST_NULL_ENTROPY ) && \
2623+ !defined(MBEDTLS_ENTROPY_HARDWARE_ALT )
2624+ #error "No entropy source was found at build time, so TLS " \
2625+ "functionality is not available"
2626+ #endif
2627+
26162628#endif /* MBEDTLS_CONFIG_H */
You can’t perform that action at this time.
0 commit comments