Skip to content

Commit 750092d

Browse files
ceolincfriedt
authored andcommitted
modules: mbedtls: Add security warning
Add a warning informing about security issues when TLS/DTLS is used without providing MBEDTLS access to time/date functions (enabling CONFIG_MBEDTLS_HAVE_TIME_DATE). Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 4040a1e commit 750092d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

modules/mbedtls/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,4 +253,15 @@ else()
253253
# included the required directories for mbedtls in their projects.
254254
endif()
255255

256+
if (CONFIG_MBEDTLS_TLS_VERSION_1_2 OR CONFIG_MBEDTLS_TLS_VERSION_1_3)
257+
if (NOT CONFIG_MBEDTLS_HAVE_TIME_DATE)
258+
message(WARNING "
259+
The option CONFIG_MBEDTLS_HAVE_TIME_DATE is required for proper
260+
certificate validation. If it is not enabled, certificates will
261+
not be checked for expiration or validity dates, which may lead
262+
to security vulnerabilities.
263+
")
264+
endif()
265+
endif()
266+
256267
endif()

0 commit comments

Comments
 (0)