Skip to content

Commit fb6452c

Browse files
krish2718jukkar
authored andcommitted
[noup] zephyr: mbedtls: Fix certificate verification failure
MbedTLS new release notes for 3.6.3 [1] now mandates that hostname verification is enabled, so, disable it explicitly till a proper hostname configuration is implemented. [1] - https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.6.3 Signed-off-by: Chaitanya Tata <[email protected]>
1 parent 86044b5 commit fb6452c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/crypto/tls_mbedtls_alt.c

+7
Original file line numberDiff line numberDiff line change
@@ -2238,6 +2238,13 @@ struct wpabuf *tls_connection_handshake(void *tls_ctx,
22382238
tls_mbedtls_ssl_ticket_parse, conn);
22392239
#endif
22402240

2241+
#ifdef MBEDTLS_X509_CRT_PARSE_C
2242+
/* This is insecure, but backwards as conf doesn't have hostname and
2243+
* for backwards compatible with MbedTLS version 3.6.3, disable
2244+
* hostname check. */
2245+
mbedtls_ssl_set_hostname(&conn->ssl, NULL);
2246+
#endif
2247+
22412248
#if MBEDTLS_VERSION_NUMBER >= 0x03020000 /* mbedtls 3.2.0 */
22422249
int ret = mbedtls_ssl_handshake(&conn->ssl);
22432250
#else

0 commit comments

Comments
 (0)