summaryrefslogtreecommitdiff
path: root/modules/websocket/websocket_client.h
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-10-07 15:38:03 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-10-09 13:53:04 +0200
commit33644d711865e518a792403304b09f0828478fe9 (patch)
tree7ec5a2e73d74ab632d73d420e90d301cae0d3a49 /modules/websocket/websocket_client.h
parent025cc04d9e8ec12cea749b6831fb8bc5c78894e2 (diff)
WebSocketClient can now use custom SSL certificate
Via the `trusted_ssl_certificate` property.
Diffstat (limited to 'modules/websocket/websocket_client.h')
-rw-r--r--modules/websocket/websocket_client.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/websocket/websocket_client.h b/modules/websocket/websocket_client.h
index 7ddb9468a5..8241914bd6 100644
--- a/modules/websocket/websocket_client.h
+++ b/modules/websocket/websocket_client.h
@@ -31,6 +31,7 @@
#ifndef WEBSOCKET_CLIENT_H
#define WEBSOCKET_CLIENT_H
+#include "core/crypto/crypto.h"
#include "core/error_list.h"
#include "websocket_multiplayer_peer.h"
#include "websocket_peer.h"
@@ -43,6 +44,7 @@ class WebSocketClient : public WebSocketMultiplayerPeer {
protected:
Ref<WebSocketPeer> _peer;
bool verify_ssl;
+ Ref<X509Certificate> ssl_cert;
static void _bind_methods();
@@ -51,6 +53,8 @@ public:
void set_verify_ssl_enabled(bool p_verify_ssl);
bool is_verify_ssl_enabled() const;
+ Ref<X509Certificate> get_trusted_ssl_certificate() const;
+ void set_trusted_ssl_certificate(Ref<X509Certificate> p_cert);
virtual void poll() = 0;
virtual Error connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, PoolVector<String> p_protocol = PoolVector<String>()) = 0;