Hi,
I am using the following boost asio example program to create a ssl connection
context_.set_options(This is the code on the client side which initiates the Server Authentication
asio::ssl::context::default_workarounds
| asio::ssl::context::no_sslv2
| asio::ssl::context::single_dh_use);
context_.set_password_callback(boost::bind(&server::get_password, this));
context_.use_certificate_chain_file("server.pem");
context_.use_private_key_file("server.pem", asio::ssl::context::pem);
context_.use_tmp_dh_file("dh512.pem");
ctx.set_verify_mode(boost::asio::ssl::context::verify_peer);But, I wanted to do Client side authentication too. So, i added the following on server side
ctx.load_verify_file("ca.pem");
ctx.set_verify_mode(boost::asio::ssl::context::verify_fail_if_no_peer_cert | boost::asio::ssl::context::verify_peer);
ctx.load_verify_file("ca.pem");
context_.set_options(
asio::ssl::context::default_workarounds
| asio::ssl::context::no_sslv2
| asio::ssl::context::single_dh_use);
context_.set_password_callback(boost::bind(&server::get_password, this));
context_.use_certificate_chain_file("client.pem");
context_.use_private_key_file("client.pem", asio::ssl::context::pem);
context_.use_tmp_dh_file("dh512.pem");