feat: support TLSv1.2 and newer (#321)

Backported from master: 82d39a90ef
This commit is contained in:
Chris Grahn 2021-09-02 01:40:06 -05:00 committed by Damien Arrachequesne
parent 6b9f5fb4b7
commit 7c60ba9d1e
No known key found for this signature in database
GPG Key ID: 544D14663E7F7CF0

View File

@ -577,10 +577,12 @@ 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::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;