Skip to content

Commit 7c60ba9

Browse files
grahndarrachequesne
authored andcommitted
feat: support TLSv1.2 and newer (#321)
Backported from master: 82d39a9
1 parent 6b9f5fb commit 7c60ba9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/internal/sio_client_impl.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -577,10 +577,12 @@ namespace sio
577577
#if SIO_TLS
578578
client_impl::context_ptr client_impl::on_tls_init(connection_hdl conn)
579579
{
580-
context_ptr ctx = context_ptr(new asio::ssl::context(asio::ssl::context::tlsv12));
580+
context_ptr ctx = context_ptr(new asio::ssl::context(asio::ssl::context::tls));
581581
asio::error_code ec;
582582
ctx->set_options(asio::ssl::context::default_workarounds |
583-
asio::ssl::context::single_dh_use,ec);
583+
asio::ssl::context::no_tlsv1 |
584+
asio::ssl::context::no_tlsv1_1 |
585+
asio::ssl::context::single_dh_use,ec);
584586
if(ec)
585587
{
586588
cerr<<"Init tls failed,reason:"<< ec.message()<<endl;

0 commit comments

Comments
 (0)