diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-05-12 23:26:43 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-05-12 23:26:43 +0200 |
commit | 1c8b203f70042b4e8acd840662aad76a20a88ca0 (patch) | |
tree | 9dc3b7bd79cb00f76170f7494b00d6a01b9e9739 /core/io/http_client_tcp.cpp | |
parent | 405aa3f2d6de7614d6dcf2d42bbff188a3e78ba4 (diff) | |
parent | eeac6f8c7f070a9f4674bfa51ec35c57516311c0 (diff) | |
download | redot-engine-1c8b203f70042b4e8acd840662aad76a20a88ca0.tar.gz |
Merge pull request #77011 from Faless/tls/fix_crashes_when_unavailable
[TLS] Fix crashes trying to use TLS when not available.
Diffstat (limited to 'core/io/http_client_tcp.cpp')
-rw-r--r-- | core/io/http_client_tcp.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/io/http_client_tcp.cpp b/core/io/http_client_tcp.cpp index 3788fa501e..2f45238951 100644 --- a/core/io/http_client_tcp.cpp +++ b/core/io/http_client_tcp.cpp @@ -60,6 +60,7 @@ Error HTTPClientTCP::connect_to_host(const String &p_host, int p_port, Ref<TLSOp } ERR_FAIL_COND_V(tls_options.is_valid() && tls_options->is_server(), ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V_MSG(tls_options.is_valid() && !StreamPeerTLS::is_available(), ERR_UNAVAILABLE, "HTTPS is not available in this build."); ERR_FAIL_COND_V(conn_host.length() < HOST_MIN_LEN, ERR_INVALID_PARAMETER); if (conn_port < 0) { |