1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

WebSocketClient can now use custom SSL certificate

Via the `trusted_ssl_certificate` property.
This commit is contained in:
Fabio Alessandrelli
2019-10-07 15:38:03 +02:00
parent 025cc04d9e
commit 33644d7118
4 changed files with 26 additions and 2 deletions

View File

@@ -237,7 +237,7 @@ void WSLClient::poll() {
ssl = Ref<StreamPeerSSL>(StreamPeerSSL::create());
ERR_FAIL_COND_MSG(ssl.is_null(), "SSL is not available in this build.");
ssl->set_blocking_handshake_enabled(false);
if (ssl->connect_to_stream(_tcp, verify_ssl, _host) != OK) {
if (ssl->connect_to_stream(_tcp, verify_ssl, _host, ssl_cert) != OK) {
disconnect_from_host();
_on_error();
return;