Use boost::asio::ssl::context::sslv23 for backwards compatibility

All the insecure protocols that this enables are then disabled, so they
cannot be actually used. The end-result is the same.
This commit is contained in:
Martijn Otto 2020-03-11 09:28:02 +01:00
parent 3031debfd6
commit 6079042cce
No known key found for this signature in database
GPG key ID: D2E0D5D0B1D606F9

View file

@ -289,7 +289,9 @@ ssl_options_t::ssl_options_t(std::vector<std::vector<std::uint8_t>> fingerprints
boost::asio::ssl::context ssl_options_t::create_context() const
{
boost::asio::ssl::context ssl_context{boost::asio::ssl::context::tls};
// note: this enables a lot of old and insecure protocols, which we
// promptly disable below - if the result is actually used
boost::asio::ssl::context ssl_context{boost::asio::ssl::context::sslv23};
if (!bool(*this))
return ssl_context;