Update TLS options

This commit is contained in:
Vladislav Khorev 2018-08-25 14:20:53 +03:00
parent ca5d2cb32f
commit bcb714ee04

View File

@ -766,13 +766,17 @@ int main()
boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), 8043);
boost::asio::ssl::context sslContext(boost::asio::ssl::context::sslv23);
boost::asio::ssl::context sslContext(boost::asio::ssl::context::tls_server);
sslContext.set_options(
boost::asio::ssl::context::default_workarounds
SSL_CTX_set_cipher_list(sslContext.native_handle(), "EECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS");
sslContext.set_options(boost::asio::ssl::context::default_workarounds
| boost::asio::ssl::context::verify_none
| boost::asio::ssl::context::no_sslv2
| boost::asio::ssl::context::single_dh_use);
| boost::asio::ssl::context::no_sslv3
| boost::asio::ssl::context::no_tlsv1
| boost::asio::ssl::context::single_dh_use
);
std::function<std::string(std::size_t, boost::asio::ssl::context_base::password_purpose)> f = [](std::size_t, boost::asio::ssl::context_base::password_purpose) -> std::string { return ""; };
sslContext.set_password_callback(f);