Work toward http/https client unification.

This commit is contained in:
Arthur Britto
2013-01-30 15:17:01 -08:00
parent 163c4869d6
commit 2f0721f80f
10 changed files with 161 additions and 59 deletions

View File

@@ -67,6 +67,18 @@ public:
std::swap(mSecure, s.mSecure);
}
boost::system::error_code verify(const std::string& strDomain)
{
boost::system::error_code ec;
mSocket->set_verify_mode(boost::asio::ssl::verify_peer);
// XXX Verify semantics of RFC 2818 are what we want.
mSocket->set_verify_callback(boost::asio::ssl::rfc2818_verification(strDomain), ec);
return ec;
}
void async_handshake(handshake_type type, callback cbFunc)
{
if ((type == ssl_socket::client) || (mSecure))