-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
From http://pocoproject.org/forum/viewtopic.php?f=10&t=6723&sid=5c739c16ce5194ced750a02a6f2a92a3
While troubleshooting a customer issue, I've run into a potential issue in the implementation of SecureSocketImpl.cpp. The method SecureSocketImpl::verifyPeerCertificateImpl causes a DNS error "Host not found" when it tries to determine if the specified host is local host. The parameter passed to the function is not the name of the proxy server, but the host name of the Web server the client is trying to connect to. Since the client's DNS has no entry for the host name, DNS throws HostNotFoundException causing the connection to close. Here is a short code snippet to demonstrate how we establish the secure connection to "somesite.com" via proxy "someproxy.dev.org:3128":
auto pocoContext = new Context(....);
auto pSesssion = new Poco::Net::HTTPSClientSession("somesite.com", 80, pocoContext);
pSession->setProxy("someproxy.dev.org", 3128);
// Proxy requires no credentials
To work around the issue I had to turn off the extended certificate validation using Poco::Net::Context::setExtendedCertificateVerification