Created
August 10, 2018 19:40
-
-
Save sangfansh/60737cb869a669cc45f1b1960347c220 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Server::Server(boost::asio::io_service& io_service, int port) : io_service_(io_service), acceptor_(io_service, | |
boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), port)), | |
context_(boost::asio::ssl::context::sslv23) { | |
this->context_.set_options(boost::asio::ssl::context::default_workarounds | |
| boost::asio::ssl::context::no_sslv2 | |
| boost::asio::ssl::context::single_dh_use); | |
this->context_.use_certificate_chain_file(Settings::server_crt); | |
this->context_.use_private_key_file(Settings::server_key, boost::asio::ssl::context::pem); | |
Log("Certificate \"" + Settings::server_crt + "\" set"); | |
Log("Server running on port: %d", port); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment