summaryrefslogtreecommitdiffstats
path: root/modules/websocket/websocket_peer.h
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2023-01-20 01:51:35 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2023-01-28 11:08:02 +0100
commitadba870534bdcdd11f0f344e66090be8e2cd9ae4 (patch)
tree90a82a28e69cf61b10f210cd02d086cdeb410d95 /modules/websocket/websocket_peer.h
parent2afa175195d0fc885badb60441bef1b31e5e6d05 (diff)
downloadredot-engine-adba870534bdcdd11f0f344e66090be8e2cd9ae4.tar.gz
[NET] Refactor TLS configuration.
Use a TLSOptions configuration object which is created via static functions. - "TLSOptions.client": uses the standard CA and common name verification. - "TLSOptions.client_unsafe": uses optional CA verification (i.e. if specified) - "TLSOptions.server": is the standard server configuration (chain + key) This will allow us to expand the TLS configuration options to include e.g. mutual authentication without bloating the classes that uses StreamPeerTLS and PacketPeerDTLS as underlying peers.
Diffstat (limited to 'modules/websocket/websocket_peer.h')
-rw-r--r--modules/websocket/websocket_peer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/websocket/websocket_peer.h b/modules/websocket/websocket_peer.h
index 3a1527b769..3110e87071 100644
--- a/modules/websocket/websocket_peer.h
+++ b/modules/websocket/websocket_peer.h
@@ -81,7 +81,7 @@ public:
return _create();
}
- virtual Error connect_to_url(const String &p_url, bool p_verify_tls = true, Ref<X509Certificate> p_cert = Ref<X509Certificate>()) { return ERR_UNAVAILABLE; };
+ virtual Error connect_to_url(const String &p_url, Ref<TLSOptions> p_options = Ref<TLSOptions>()) = 0;
virtual Error accept_stream(Ref<StreamPeer> p_stream) = 0;
virtual Error send(const uint8_t *p_buffer, int p_buffer_size, WriteMode p_mode) = 0;