1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +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

@@ -69,8 +69,12 @@ Error EMWSClient::connect_to_host(String p_host, String p_path, uint16_t p_port,
String proto_string = p_protocols.join(",");
String str = "ws://";
if (p_ssl)
if (p_ssl) {
str = "wss://";
if (ssl_cert.is_valid()) {
WARN_PRINT_ONCE("Custom SSL certificate is not supported in HTML5 platform.");
}
}
str += p_host + ":" + itos(p_port) + p_path;
_is_connecting = true;