I have problems to get SSL working with asio library.
this is how i set up a server part.
serverServicePtr->network_context->set_options(boost::asio::ssl::context::default_workarounds| boost::asio::ssl::context::no_sslv2 );
serverServicePtr->network_context->set_password_callback(boost::bind(&ServerService::GetPassword));
serverServicePtr->network_context->use_private_key_file("privkey.pem", boost::asio::ssl::context::pem);
...
clientSocket->handshake( boost::asio::ssl::stream_base::server );
client part:
boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23);
ctx.load_verify_file("pubkey.pem");
ctx.set_verify_mode(boost::asio::ssl::verify_peer);
ctx.set_verify_callback(boost::bind(&verify_certificate, _1, _2));
boost::asio::ssl::stream<boost::asio::ip::tcp::socket> s(io_service, ctx);
boost::asio::connect(s.lowest_layer(), iterator);
s.lowest_layer().set_option(boost::asio::ip::tcp::no_delay(true));
s.handshake(boost::asio::ssl::stream_base::client);
it failes on handshake. Server says "handshake: no shared cipher" and client just says. that server refuses client.
My question is, where is a problem? What i am missing? perhaps, i generated my keys wrong? How to generate them right for asio?