Browse Source

Merge pull request #96172 from Faless/fix/tls_unsafe_pin

[mbedTLS] Fix incorrect cert pinning with `client_unsafe`
Rémi Verschelde 1 year ago
parent
commit
e6f94443ba
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/mbedtls/tls_context_mbedtls.cpp

+ 1 - 1
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;
 	}