feat: use TLSv2 when TLS is used (#309)

Backported from master: e8ea70776d
This commit is contained in:
Johny Qiu 2021-06-11 17:16:28 +08:00 committed by GitHub
parent 168ce9d10b
commit 6b9f5fb4b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
{