From c09221f357effe1a5a0fc0e7d7902eba1ab0484d Mon Sep 17 00:00:00 2001 From: Rich E Date: Thu, 22 Apr 2021 15:10:31 -0400 Subject: [PATCH 1/3] fix: fix LOG call syntax (#301) Related: https://github.com/socketio/socket.io-client-cpp/issues/212 --- src/internal/sio_client_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/sio_client_impl.cpp b/src/internal/sio_client_impl.cpp index 2eab3ad5..5b331f23 100644 --- a/src/internal/sio_client_impl.cpp +++ b/src/internal/sio_client_impl.cpp @@ -286,7 +286,7 @@ namespace sio if(ec || m_con.expired()) { if (ec != asio::error::operation_aborted) - LOG("ping exit,con is expired?"<expires_from_now(milliseconds(m_ping_interval), ec); - if(ec)LOG("ec:"<async_wait(std::bind(&client_impl::ping,this, std::placeholders::_1)); LOG("On handshake,sid:"< Date: Thu, 22 Apr 2021 15:11:08 -0400 Subject: [PATCH 2/3] fix: fix ASIO_STANDALONE release build trying to use boost::random (#301) --- src/internal/sio_client_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/sio_client_impl.h b/src/internal/sio_client_impl.h index 577b1dd2..735fe502 100644 --- a/src/internal/sio_client_impl.h +++ b/src/internal/sio_client_impl.h @@ -4,7 +4,7 @@ #include #ifdef _WIN32 #define _WEBSOCKETPP_CPP11_THREAD_ -//#define _WEBSOCKETPP_CPP11_RANDOM_DEVICE_ +#define _WEBSOCKETPP_CPP11_RANDOM_DEVICE_ #define _WEBSOCKETPP_NO_CPP11_FUNCTIONAL_ #define INTIALIZER(__TYPE__) #else From 71897e8ed8f7c60214ac86c392c61bc1d7439c73 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Tue, 12 Oct 2021 10:32:33 +0200 Subject: [PATCH 3/3] feat: support TLSv1.2 and newer Backported from master: https://github.com/socketio/socket.io-client-cpp/commit/82d39a90ef118500a0329d214eec331db983bd74 --- src/internal/sio_client_impl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/internal/sio_client_impl.cpp b/src/internal/sio_client_impl.cpp index 5b331f23..c7568874 100644 --- a/src/internal/sio_client_impl.cpp +++ b/src/internal/sio_client_impl.cpp @@ -577,11 +577,12 @@ namespace sio #if SIO_TLS client_impl::context_ptr client_impl::on_tls_init(connection_hdl conn) { - context_ptr ctx = context_ptr(new asio::ssl::context(asio::ssl::context::tlsv1)); + context_ptr ctx = context_ptr(new asio::ssl::context(asio::ssl::context::tls)); asio::error_code ec; ctx->set_options(asio::ssl::context::default_workarounds | - asio::ssl::context::no_sslv2 | - asio::ssl::context::single_dh_use,ec); + asio::ssl::context::no_tlsv1 | + asio::ssl::context::no_tlsv1_1 | + asio::ssl::context::single_dh_use,ec); if(ec) { cerr<<"Init tls failed,reason:"<< ec.message()<