From 6b9f5fb4b766455cde01e16ffaf34db30ac10227 Mon Sep 17 00:00:00 2001 From: Johny Qiu Date: Fri, 11 Jun 2021 17:16:28 +0800 Subject: [PATCH] feat: use TLSv2 when TLS is used (#309) Backported from master: https://github.com/socketio/socket.io-client-cpp/commit/e8ea70776dc0902725b38d1f988fbadc40474d14 --- src/internal/sio_client_impl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/internal/sio_client_impl.cpp b/src/internal/sio_client_impl.cpp index 5b331f2..1f5e22e 100644 --- a/src/internal/sio_client_impl.cpp +++ b/src/internal/sio_client_impl.cpp @@ -577,10 +577,9 @@ failed: #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::tlsv12)); asio::error_code ec; ctx->set_options(asio::ssl::context::default_workarounds | - asio::ssl::context::no_sslv2 | asio::ssl::context::single_dh_use,ec); if(ec) {