From 528e791a5fa0032f335c6410d3e961851e29b325 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 7 Sep 2022 00:46:12 +0200 Subject: [Net] Rename StreamPeerSSL to StreamPeerTLS. SSL has been deprectated almost 10 years ago. --- modules/websocket/wsl_client.cpp | 10 +++++----- modules/websocket/wsl_client.h | 2 +- modules/websocket/wsl_server.cpp | 12 ++++++------ modules/websocket/wsl_server.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'modules/websocket') diff --git a/modules/websocket/wsl_client.cpp b/modules/websocket/wsl_client.cpp index 2bb57226ea..290108706b 100644 --- a/modules/websocket/wsl_client.cpp +++ b/modules/websocket/wsl_client.cpp @@ -288,11 +288,11 @@ void WSLClient::poll() { break; case StreamPeerTCP::STATUS_CONNECTED: { _ip_candidates.clear(); - Ref ssl; + Ref ssl; if (_use_ssl) { if (_connection == _tcp) { // Start SSL handshake - ssl = Ref(StreamPeerSSL::create()); + ssl = Ref(StreamPeerTLS::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, ssl_cert) != OK) { @@ -302,13 +302,13 @@ void WSLClient::poll() { } _connection = ssl; } else { - ssl = static_cast>(_connection); + ssl = static_cast>(_connection); ERR_FAIL_COND(ssl.is_null()); // Bug? ssl->poll(); } - if (ssl->get_status() == StreamPeerSSL::STATUS_HANDSHAKING) { + if (ssl->get_status() == StreamPeerTLS::STATUS_HANDSHAKING) { return; // Need more polling. - } else if (ssl->get_status() != StreamPeerSSL::STATUS_CONNECTED) { + } else if (ssl->get_status() != StreamPeerTLS::STATUS_CONNECTED) { disconnect_from_host(); _on_error(); return; // Error. diff --git a/modules/websocket/wsl_client.h b/modules/websocket/wsl_client.h index 5d90bc4034..dc4397f04a 100644 --- a/modules/websocket/wsl_client.h +++ b/modules/websocket/wsl_client.h @@ -34,8 +34,8 @@ #ifndef WEB_ENABLED #include "core/error/error_list.h" -#include "core/io/stream_peer_ssl.h" #include "core/io/stream_peer_tcp.h" +#include "core/io/stream_peer_tls.h" #include "websocket_client.h" #include "wsl_peer.h" #include "wslay/wslay.h" diff --git a/modules/websocket/wsl_server.cpp b/modules/websocket/wsl_server.cpp index 7457ac7087..ddef360cf5 100644 --- a/modules/websocket/wsl_server.cpp +++ b/modules/websocket/wsl_server.cpp @@ -103,15 +103,15 @@ Error WSLServer::PendingPeer::do_handshake(const Vector p_protocols, uin } if (use_ssl) { - Ref ssl = static_cast>(connection); + Ref ssl = static_cast>(connection); if (ssl.is_null()) { - ERR_FAIL_V_MSG(ERR_BUG, "Couldn't get StreamPeerSSL for WebSocket handshake."); + ERR_FAIL_V_MSG(ERR_BUG, "Couldn't get StreamPeerTLS for WebSocket handshake."); } ssl->poll(); - if (ssl->get_status() == StreamPeerSSL::STATUS_HANDSHAKING) { + if (ssl->get_status() == StreamPeerTLS::STATUS_HANDSHAKING) { return ERR_BUSY; - } else if (ssl->get_status() != StreamPeerSSL::STATUS_CONNECTED) { - print_verbose(vformat("WebSocket SSL connection error during handshake (StreamPeerSSL status code %d).", ssl->get_status())); + } else if (ssl->get_status() != StreamPeerTLS::STATUS_CONNECTED) { + print_verbose(vformat("WebSocket SSL connection error during handshake (StreamPeerTLS status code %d).", ssl->get_status())); return FAILED; } } @@ -248,7 +248,7 @@ void WSLServer::poll() { Ref peer = memnew(PendingPeer); if (private_key.is_valid() && ssl_cert.is_valid()) { - Ref ssl = Ref(StreamPeerSSL::create()); + Ref ssl = Ref(StreamPeerTLS::create()); ssl->set_blocking_handshake_enabled(false); ssl->accept_stream(conn, private_key, ssl_cert, ca_chain); peer->connection = ssl; diff --git a/modules/websocket/wsl_server.h b/modules/websocket/wsl_server.h index b0b7a6a5c9..ce91cfe888 100644 --- a/modules/websocket/wsl_server.h +++ b/modules/websocket/wsl_server.h @@ -36,8 +36,8 @@ #include "websocket_server.h" #include "wsl_peer.h" -#include "core/io/stream_peer_ssl.h" #include "core/io/stream_peer_tcp.h" +#include "core/io/stream_peer_tls.h" #include "core/io/tcp_server.h" class WSLServer : public WebSocketServer { -- cgit v1.2.3