* Allows SecureStreamSocket::attach to be used in server connections

* Move order of condition for isLocalHost in peer certificate verification, to skip DNS lookup if not needed
This commit is contained in:
Rangell Reale
2014-09-12 15:47:00 -03:00
committed by Rangel Reale
parent 67b206f663
commit 21f2e115eb
2 changed files with 25 additions and 7 deletions

View File

@@ -358,7 +358,7 @@ long SecureSocketImpl::verifyPeerCertificateImpl(const std::string& hostName)
{
Context::VerificationMode mode = _pContext->verificationMode();
if (mode == Context::VERIFY_NONE || !_pContext->extendedCertificateVerificationEnabled() ||
(isLocalHost(hostName) && mode != Context::VERIFY_STRICT))
(mode != Context::VERIFY_STRICT && isLocalHost(hostName)))
{
return X509_V_OK;
}