From 1d775b5b97053ed76d620e43c44ca3e799e3f5ed Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 27 Aug 2024 13:10:09 +0200 Subject: [PATCH] [mbedTLS] Fix incorrect cert pinning with client_unsafe (cherry picked from commit ccae47ab667174ac521b7d1a1b2fe330ea11ce1e) --- modules/mbedtls/tls_context_mbedtls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mbedtls/tls_context_mbedtls.cpp b/modules/mbedtls/tls_context_mbedtls.cpp index eaea7b92933..f5c196596eb 100644 --- a/modules/mbedtls/tls_context_mbedtls.cpp +++ b/modules/mbedtls/tls_context_mbedtls.cpp @@ -153,7 +153,7 @@ Error TLSContextMbedTLS::init_client(int p_transport, const String &p_hostname, int authmode = MBEDTLS_SSL_VERIFY_REQUIRED; bool unsafe = p_options->is_unsafe_client(); - if (unsafe && p_options->get_trusted_ca_chain().is_valid()) { + if (unsafe && p_options->get_trusted_ca_chain().is_null()) { authmode = MBEDTLS_SSL_VERIFY_NONE; }