Skip to content

Commit

Permalink
feat: support TLSv1.2 and newer (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
grahn authored Sep 2, 2021
1 parent e8ea707 commit 82d39a9
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 @@ -599,10 +599,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 82d39a9

Please sign in to comment.