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
1 changed files with 3 additions and 1 deletions

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;