Update TLS options
This commit is contained in:
parent
ca5d2cb32f
commit
bcb714ee04
14
main.cpp
14
main.cpp
@ -766,13 +766,17 @@ int main()
|
|||||||
|
|
||||||
boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::tcp::v4(), 8043);
|
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(
|
SSL_CTX_set_cipher_list(sslContext.native_handle(), "EECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS");
|
||||||
boost::asio::ssl::context::default_workarounds
|
|
||||||
|
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::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 ""; };
|
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);
|
sslContext.set_password_callback(f);
|
||||||
|
Loading…
Reference in New Issue
Block a user