context_ptr ctx = websocketpp::lib::make_shared<boost::asio::ssl::context>(boost::asio::ssl::context::tlsv12_client);
try {
ctx->set_options(boost::asio::ssl::context::default_workarounds |
boost::asio::ssl::context::no_sslv2 |
boost::asio::ssl::context::no_sslv3);
// we will need to enable these methods to get TLS working with client verification
ctx->set_verify_mode(boost::asio::ssl::verify_peer);
ctx->set_verify_callback(bind(&ConnectionMetadata::verify_server_cert, this,
websocketpp::lib::placeholders::_1, websocketpp::lib::placeholders::_2));
This is the code snippet of the on_tls_init which is successfully called, but the callback we are setting in set_verify_callback is not called.