Switch to turn of SSL peer verification.

This commit is contained in:
JoelKatz
2013-02-28 11:44:30 -08:00
parent a337061084
commit ca5f3833dd
3 changed files with 14 additions and 4 deletions

View File

@@ -34,6 +34,8 @@ HttpsClient::HttpsClient(
mResponseMax(responseMax),
mDeadline(io_service)
{
if (!theConfig.SSL_VERIFY)
mSocket.SSLSocket().set_verify_mode(boost::asio::ssl::verify_none);
}
void HttpsClient::makeGet(const std::string& strPath, boost::asio::streambuf& sb, const std::string& strHost)
@@ -206,11 +208,13 @@ void HttpsClient::handleConnect(const boost::system::error_code& ecResult)
{
cLog(lsTRACE) << "Connected.";
mShutdown = mSocket.verify(mDeqSites[0]);
if (mShutdown)
if (theConfig.SSL_VERIFY)
{
cLog(lsTRACE) << "set_verify_callback: " << mDeqSites[0] << ": " << mShutdown.message();
mShutdown = mSocket.verify(mDeqSites[0]);
if (mShutdown)
{
cLog(lsTRACE) << "set_verify_callback: " << mDeqSites[0] << ": " << mShutdown.message();
}
}
}