From bcb714ee040b9d5365df661f808b9195ada6c366 Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Sat, 25 Aug 2018 14:20:53 +0300 Subject: [PATCH] Update TLS options --- main.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index f019591..6966597 100755 --- a/main.cpp +++ b/main.cpp @@ -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 f = [](std::size_t, boost::asio::ssl::context_base::password_purpose) -> std::string { return ""; }; sslContext.set_password_callback(f);