Skip to content

Commit

Permalink
feat: support TLSv1.2 and newer (#321)
Browse files Browse the repository at this point in the history
Backported from master: 82d39a9
  • Loading branch information
grahn authored and darrachequesne committed Oct 12, 2021
1 parent 6b9f5fb commit 7c60ba9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/internal/sio_client_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,10 +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::tlsv12));
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::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()<<endl;
Expand Down

0 comments on commit 7c60ba9

Please sign in to comment.