|
Squid Web Cache master
|
#include <PeerConnector.h>
Public Types | |
| typedef CbcPointer< PeerConnector > | Pointer |
Public Member Functions | |
| PeerConnector (const Comm::ConnectionPointer &aServerConn, const AsyncCallback< EncryptorAnswer > &, const AccessLogEntryPointer &alp, const time_t timeout=0) | |
| ~PeerConnector () override | |
| bool | canBeCalled (AsyncCall &call) const |
| whether we can be called | |
| void | callStart (AsyncCall &call) |
| virtual void | callEnd () |
| called right after the called job method | |
| virtual void | callException (const std::exception &e) |
| called when the job throws during an async call | |
| void | handleStopRequest () |
| process external request to terminate now (i.e. during this async call) | |
| virtual void * | toCbdata ()=0 |
Static Public Member Functions | |
| static void | Start (const Pointer &job) |
| static void | RegisterWithCacheManager () |
Public Attributes | |
| bool | noteFwdPconnUse |
| hack: whether the connection requires fwdPconnPool->noteUses() | |
| const InstanceId< AsyncJob > | id |
| job identifier | |
Protected Member Functions | |
| void | start () override |
| Preps connection and SSL state. Calls negotiate(). | |
| bool | doneAll () const override |
| whether positive goal has been reached | |
| void | swanSong () override |
| const char * | status () const override |
| internal cleanup; do not call directly | |
| void | fillChecklist (ACLFilledChecklist &) const override |
| configure the given checklist (to reflect the current transaction state) | |
| void | commTimeoutHandler (const CommTimeoutCbParams &) |
| The connection read timeout callback handler. | |
| void | commCloseHandler (const CommCloseCbParams ¶ms) |
| The comm_close callback handler. | |
| virtual bool | initialize (Security::SessionPointer &) |
| void | negotiate () |
| bool | sslFinalized () |
| void | handleNegotiationResult (const Security::IoResult &) |
| Called after each negotiation step to handle the result. | |
| void | noteWantRead () |
| bool | isSuspended () const |
| Whether TLS negotiation has been paused and not yet resumed. | |
| void | suspendNegotiation (const Security::IoResult &lastError) |
| void | resumeNegotiation () |
| Resumes TLS negotiation paused by suspendNegotiation() | |
| void | handleMissingCertificates (const Security::IoResult &lastError) |
| Either initiates fetching of missing certificates or bails with an error. | |
| void | startCertDownloading (SBuf &url) |
| Start downloading procedure for the given URL. | |
| void | certDownloadingDone (DownloaderAnswer &) |
| Called by Downloader after a certificate object downloaded. | |
| virtual void | noteWantWrite () |
| virtual void | noteNegotiationError (const Security::ErrorDetailPointer &) |
| Called when the SSL_connect function aborts with an SSL negotiation error. | |
| virtual void | noteNegotiationDone (ErrorState *) |
| virtual FuturePeerContext * | peerContext () const =0 |
| Comm::ConnectionPointer const & | serverConnection () const |
| mimics FwdState to minimize changes to FwdState::initiate/negotiateSsl | |
| void | bail (ErrorState *error) |
| sends the given error to the initiator | |
| void | sendSuccess () |
| sends the encrypted connection to the initiator | |
| void | callBack () |
| a bail(), sendSuccess() helper: sends results to the initiator | |
| void | disconnect () |
| a bail(), sendSuccess() helper: stops monitoring the connection | |
| void | countFailingConnection () |
| updates connection usage history before the connection is closed | |
| void | bypassCertValidator () |
| If called the certificates validator will not used. | |
| void | recordNegotiationDetails () |
| EncryptorAnswer & | answer () |
| convenience method to get to the answer fields | |
| void | deleteThis (const char *aReason) |
| void | mustStop (const char *aReason) |
| bool | done () const |
| the job is destroyed in callEnd() when done() | |
Static Protected Member Functions | |
| static void | ReportAllJobs (StoreEntry *) |
| writes a cache manager report about all jobs existing in this worker | |
Protected Attributes | |
| HttpRequestPointer | request |
| peer connection trigger or cause | |
| Comm::ConnectionPointer | serverConn |
| TCP connection to the peer. | |
| AccessLogEntryPointer | al |
| info for the future access.log entry | |
| AsyncCallback< EncryptorAnswer > | callback |
| answer destination | |
| const char * | stopReason |
| reason for forcing done() to be true | |
| const char * | typeName |
| kid (leaf) class name, for debugging | |
| AsyncCall::Pointer | inCall |
| the asynchronous call being handled, if any | |
| bool | started_ = false |
| Start() has finished successfully. | |
| bool | swanSang_ = false |
| swanSong() was called | |
Private Member Functions | |
| CBDATA_INTERMEDIATE () | |
| PeerConnector (const PeerConnector &) | |
| PeerConnector & | operator= (const PeerConnector &) |
| unsigned int | certDownloadNestingLevel () const |
| the number of concurrent PeerConnector jobs waiting for us | |
| void | sslCrtvdHandleReply (Ssl::CertValidationResponsePointer &) |
| Process response from cert validator helper. | |
| Security::CertErrors * | sslCrtvdCheckForErrors (Ssl::CertValidationResponse const &, ErrorDetailPointer &) |
| Check SSL errors returned from cert validator against sslproxy_cert_error access list. | |
| bool | computeMissingCertificateUrls (const Connection &) |
| finds URLs of (some) missing intermediate certificates or returns false | |
| void | negotiateSsl () |
| Comm::SetSelect() callback. Direct calls tickle/resume negotiations. | |
| virtual void | finalizedInCbdataChild ()=0 |
| hack: ensure CBDATA_CHILD() after a toCbdata()-defining CBDATA_INTERMEDIATE() | |
Static Private Member Functions | |
| static void | NegotiateSsl (int fd, void *data) |
| A wrapper for Comm::SetSelect() notifications. | |
Private Attributes | |
| Security::KeyLogger | keyLogger |
| managers logging of the being-established TLS connection secrets | |
| AsyncCall::Pointer | closeHandler |
| we call this when the connection closed | |
| time_t | negotiationTimeout |
| the SSL connection timeout to use | |
| time_t | startTime |
| when the peer connector negotiation started | |
| bool | useCertValidator_ |
| std::queue< SBuf > | urlsOfMissingCerts |
| The list of URLs where missing certificates should be downloaded. | |
| unsigned int | certsDownloads |
| the number of downloaded missing certificates | |
| Ssl::X509_STACK_Pointer | downloadedCerts |
| successfully downloaded intermediate certificates (omitted by the peer) | |
| Security::IoResultPointer | suspendedError_ |
| outcome of the last (failed and) suspended negotiation attempt (or nil) | |
| JobWait< Downloader > | certDownloadWait |
| waits for the missing certificate to be downloaded | |
Static Private Attributes | |
| static const unsigned int | MaxCertsDownloads = 10 |
| The maximum number of missing certificates a single PeerConnector may download. | |
| static const unsigned int | MaxNestedDownloads = 3 |
| The maximum number of inter-dependent Downloader jobs a worker may initiate. | |
Initiates encryption of a given open TCP connection to a peer or server. Despite its name does not perform any connect(2) operations. Owns the connection during TLS negotiations. The caller receives EncryptorAnswer.
Contains common code and interfaces of various specialized PeerConnector's, including peer certificate validation code.
Definition at line 48 of file PeerConnector.h.
Definition at line 53 of file PeerConnector.h.
| Security::PeerConnector::PeerConnector | ( | const Comm::ConnectionPointer & | aServerConn, |
| const AsyncCallback< EncryptorAnswer > & | aCallback, | ||
| const AccessLogEntryPointer & | alp, | ||
| const time_t | timeout = 0 |
||
| ) |
Definition at line 40 of file PeerConnector.cc.
References closeHandler, comm_add_close_handler(), commCloseHandler(), debugs, Comm::Connection::fd, fd_table, Comm::IsConnOpen(), JobCallback, Must, and serverConn.
|
overridedefault |
|
private |
|
protected |
Definition at line 497 of file PeerConnector.cc.
References assert.
|
protected |
Definition at line 504 of file PeerConnector.cc.
|
inlineprotected |
Definition at line 156 of file PeerConnector.h.
References useCertValidator_.
|
protected |
Definition at line 555 of file PeerConnector.cc.
References Assure, debugs, and ScheduleCallHere.
|
virtualinherited |
called right after the called job method
Reimplemented in Adaptation::Icap::Xaction.
Definition at line 152 of file AsyncJob.cc.
References assert, AsyncCall::debugLevel, debugs, AsyncCall::debugSection, AsyncJob::done(), AsyncJob::inCall, AsyncJob::started_, AsyncJob::status(), AsyncJob::swanSang_, AsyncJob::swanSong(), and AsyncJob::typeName.
Referenced by Adaptation::Icap::Xaction::callEnd(), and AsyncJob::deleteThis().
|
virtualinherited |
Reimplemented in ConnStateData, ClientHttpRequest, Rock::Rebuild, Adaptation::Icap::ModXact, Adaptation::Icap::ServiceRep, Adaptation::Icap::Xaction, Ipc::Forwarder, Ipc::Inquirer, and Ftp::Server.
Definition at line 143 of file AsyncJob.cc.
References cbdataReferenceValid(), debugs, Must, AsyncJob::mustStop(), and CbdataParent::toCbdata().
Referenced by ConnStateData::callException(), Adaptation::Icap::Xaction::callException(), Ipc::Forwarder::callException(), Ipc::Inquirer::callException(), and Ftp::Server::callException().
|
inherited |
called just before the called method
Definition at line 130 of file AsyncJob.cc.
References cbdataReferenceValid(), AsyncCall::debugLevel, debugs, AsyncCall::debugSection, AsyncJob::inCall, Must, AsyncJob::status(), CbdataParent::toCbdata(), and AsyncJob::typeName.
|
inherited |
Definition at line 117 of file AsyncJob.cc.
References AsyncCall::cancel(), debugs, and AsyncJob::inCall.
|
private |
|
protected |
Definition at line 624 of file PeerConnector.cc.
References debugs, fd_table, Ssl::findIssuerCertificate(), Ssl::findIssuerUri(), Comm::IsConnOpen(), SBuf::length(), Must, DownloaderAnswer::outcome, SBuf::rawContent(), and DownloaderAnswer::resource.
Referenced by startCertDownloading().
|
private |
Definition at line 601 of file PeerConnector.cc.
|
protected |
Definition at line 109 of file PeerConnector.cc.
References CommCommonCbParams::data, debugs, ERR_SECURE_CONNECT_FAIL, CommCommonCbParams::fd, MakeNamedErrorDetail(), and Http::scServiceUnavailable.
Referenced by PeerConnector().
|
protected |
Definition at line 129 of file PeerConnector.cc.
References debugs, ERR_SECURE_CONNECT_FAIL, MakeNamedErrorDetail(), and Http::scGatewayTimeout.
Referenced by noteWantRead().
|
private |
Definition at line 706 of file PeerConnector.cc.
References assert, debugs, and Ssl::missingChainCertificatesUrls().
|
protected |
Definition at line 528 of file PeerConnector.cc.
References assert, fd_table, fwdPconnPool, NoteOutgoingConnectionFailure(), and PconnPool::noteUses().
|
protectedinherited |
Definition at line 65 of file AsyncJob.cc.
References asyncCall(), AsyncJob::callEnd(), debugs, AsyncJob::deleteThis(), AsyncJob::inCall, JobMemFun(), Must, AsyncJob::stopReason, and AsyncJob::typeName.
Referenced by ConnStateData::connStateClosed(), and AsyncJob::deleteThis().
|
protected |
Definition at line 538 of file PeerConnector.cc.
References comm_remove_close_handler(), commUnsetConnTimeout(), and Comm::IsConnOpen().
|
protectedinherited |
Definition at line 106 of file AsyncJob.cc.
References AsyncJob::doneAll(), and AsyncJob::stopReason.
Referenced by AsyncJob::callEnd(), HappyConnOpener::checkForNewConnection(), Downloader::downloadFinished(), and HappyConnOpener::maybeOpenPrimeConnection().
|
overrideprotectedvirtual |
Reimplemented from AsyncJob.
Definition at line 63 of file PeerConnector.cc.
References AsyncJob::doneAll().
|
overrideprotectedvirtual |
Implements Acl::ChecklistFiller.
Reimplemented in Ssl::IcapPeerConnector.
Definition at line 91 of file PeerConnector.cc.
References ACLFilledChecklist::al, fd_table, Security::LockingPointer< T, UnLocker, Locker >::resetWithoutLocking(), ACLFilledChecklist::serverCert, and ACLFilledChecklist::syncAle().
Referenced by Ssl::IcapPeerConnector::fillChecklist().
|
privatepure virtualinherited |
|
protected |
Definition at line 680 of file PeerConnector.cc.
References assert, Ssl::VerifyCallbackParameters::At(), Ssl::VerifyCallbackParameters::callerHandlesMissingCertificates, fd_table, Comm::IsConnOpen(), and Must.
|
protected |
Definition at line 259 of file PeerConnector.cc.
References Security::IoResult::category, debugs, Security::IoResult::errorDetail, Debug::Extra(), Security::IoResult::ioError, Security::IoResult::ioSuccess, Security::IoResult::ioWantRead, and Security::IoResult::ioWantWrite.
|
inlineinherited |
Definition at line 73 of file AsyncJob.h.
References AsyncJob::mustStop().
|
protectedvirtual |
Reimplemented in Ssl::IcapPeerConnector, Security::BlindPeerConnector, and Ssl::PeekingPeerConnector.
Definition at line 139 of file PeerConnector.cc.
References SquidConfig::cert_error, Config, Security::CreateClientSession(), DBG_IMPORTANT, debugs, ERR_SOCKET_FAILURE, fd_table, Comm::IsConnOpen(), ACLFilledChecklist::Make(), Must, Ssl::VerifyCallbackParameters::New(), Http::scInternalServerError, ssl_ex_index_cert_error_check, and Ssl::TheConfig.
Referenced by Ssl::IcapPeerConnector::initialize(), Security::BlindPeerConnector::initialize(), and Ssl::PeekingPeerConnector::initialize().
|
inlineprotected |
Definition at line 101 of file PeerConnector.h.
References suspendedError_.
|
protectedinherited |
Definition at line 85 of file AsyncJob.cc.
References debugs, AsyncJob::inCall, Must, AsyncJob::stopReason, and AsyncJob::typeName.
Referenced by HttpStateData::abortAll(), AsyncJob::callException(), HttpStateData::continueAfterParsingHeader(), HttpStateData::drop1xx(), AsyncJob::handleStopRequest(), HttpStateData::httpStateConnClosed(), HttpStateData::httpTimeout(), HttpStateData::proceedAfter1xx(), ConnStateData::proxyProtocolError(), HttpStateData::readReply(), HttpStateData::start(), and HttpStateData::wroteLast().
|
protected |
Performs a single secure connection negotiation step. It is called multiple times until the negotiation finishes or aborts.
Definition at line 213 of file PeerConnector.cc.
References Ssl::VerifyCallbackParameters::At(), Security::Connect(), DBG_IMPORTANT, debugs, fd_table, Security::IoResult::ioSuccess, Comm::IsConnOpen(), and Must.
|
private |
Definition at line 449 of file PeerConnector.cc.
References CallJobHere.
|
staticprivate |
Definition at line 439 of file PeerConnector.cc.
|
inlineprotectedvirtual |
Called when the SSL negotiation to the server completed and the certificates validated using the cert validator.
| error | if not NULL the SSL negotiation was aborted with an error |
Reimplemented in Security::BlindPeerConnector, Ssl::IcapPeerConnector, and Ssl::PeekingPeerConnector.
Definition at line 131 of file PeerConnector.h.
|
protectedvirtual |
Reimplemented in Ssl::PeekingPeerConnector.
Definition at line 485 of file PeerConnector.cc.
References ERR_SECURE_CONNECT_FAIL, ErrorState::NewForwarding(), and Security::ErrorDetail::sysError().
Referenced by Ssl::PeekingPeerConnector::noteNegotiationError().
|
protected |
Called when the openSSL SSL_connect function request more data from the remote SSL server. Sets the read timeout and sets the Squid COMM_SELECT_READ handler.
Definition at line 456 of file PeerConnector.cc.
References COMM_SELECT_READ, commSetConnTimeout(), commTimeoutHandler(), debugs, Comm::IsConnOpen(), JobCallback, Comm::MortalReadTimeout(), Must, and Comm::SetSelect().
|
protectedvirtual |
Called when the openSSL SSL_connect function needs to write data to the remote SSL server. Sets the Squid COMM_SELECT_WRITE handler.
Reimplemented in Ssl::PeekingPeerConnector.
Definition at line 474 of file PeerConnector.cc.
References COMM_SELECT_WRITE, debugs, Comm::IsConnOpen(), Must, and Comm::SetSelect().
Referenced by Ssl::PeekingPeerConnector::checkForPeekAndSpliceMatched(), and Ssl::PeekingPeerConnector::noteWantWrite().
|
private |
|
protectedpure virtual |
peer's security context
Implemented in Ssl::IcapPeerConnector, Security::BlindPeerConnector, and Ssl::PeekingPeerConnector.
|
protected |
Called after negotiation finishes to record connection details for logging
Definition at line 193 of file PeerConnector.cc.
References BIO_get_data(), fd_table, Comm::IsConnOpen(), Must, and Ssl::ServerBio::receivedHelloDetails().
|
staticinherited |
Definition at line 215 of file AsyncJob.cc.
References Mgr::RegisterAction(), and AsyncJob::ReportAllJobs().
Referenced by mainInitialize().
|
staticprotectedinherited |
Definition at line 198 of file AsyncJob.cc.
References AllJobs().
Referenced by AsyncJob::RegisterWithCacheManager().
|
protected |
Definition at line 740 of file PeerConnector.cc.
References fd_table, Must, SQUID_TLS_ERR_CONNECT, and Ssl::VerifyConnCertificates().
|
protected |
Definition at line 519 of file PeerConnector.cc.
References assert, and Comm::IsConnOpen().
|
inlineprotected |
Definition at line 138 of file PeerConnector.h.
References serverConn.
Referenced by Security::BlindPeerConnector::peerContext().
|
private |
Checks errors in the cert. validator response against sslproxy_cert_error. The first honored error, if any, is returned via errDetails parameter. The method returns all seen errors except SSL_ERROR_NONE as Security::CertErrors.
Definition at line 385 of file PeerConnector.cc.
References assert, SquidConfig::cert_error, Config, debugs, Ssl::CertValidationResponse::errors, fd_table, Comm::IsConnOpen(), Must, and CbDataList< C >::push_back_unique().
|
private |
Definition at line 334 of file PeerConnector.cc.
References debugs, ErrorState::detailError(), Debug::Enabled(), ERR_GATEWAY_FAILURE, ERR_SECURE_CONNECT_FAIL, Helper::Error, fd_table, Comm::IsConnOpen(), Must, Helper::Okay, RawPointer(), Http::scInternalServerError, Http::scServiceUnavailable, server, ssl_ex_index_server, and ssl_ex_index_ssl_errors.
Referenced by sslFinalized().
|
protected |
Called after negotiation has finished. Cleans up TLS/SSL state. Returns false if we are now waiting for the certs validation job. Otherwise, returns true, regardless of negotiation success/failure.
Definition at line 289 of file PeerConnector.cc.
References asyncCallback, DBG_IMPORTANT, debugs, Ssl::CertValidationRequest::domainName, ERR_GATEWAY_FAILURE, Ssl::CertValidationRequest::errors, fd_table, Comm::IsConnOpen(), Must, Http::scInternalServerError, Ssl::CertValidationRequest::ssl, ssl_ex_index_server, ssl_ex_index_ssl_errors, sslCrtvdHandleReply(), Ssl::CertValidationHelper::Submit(), and Ssl::TheConfig.
|
overrideprotectedvirtual |
Reimplemented from AsyncJob.
Definition at line 70 of file PeerConnector.cc.
References assert, debugs, ERR_CONNECT_FAIL, fd_table, Comm::IsConnOpen(), Http::scBadGateway, and AsyncJob::start().
|
staticinherited |
Promises to start the configured job (eventually). The job is deemed to be running asynchronously beyond this point, so the caller should only access the job object via AsyncCalls rather than directly.
swanSong() is only called for jobs for which this method has returned successfully (i.e. without throwing).
Definition at line 37 of file AsyncJob.cc.
References CallJobHere, AsyncJob::start(), and AsyncJob::started_.
Referenced by Ftp::Server::AcceptCtrlConnection(), clientListenerConnectionOpened(), Ipc::Coordinator::handleCacheMgrRequest(), Ipc::Coordinator::handleSnmpRequest(), httpAccept(), httpsAccept(), httpStart(), idnsInitVC(), Ftp::Gateway::listenForDataChannel(), Ftp::Server::listenForDataConnection(), Log::TcpLogger::Open(), peerProbeConnect(), Mgr::FunAction::respond(), Mgr::InfoAction::respond(), Ipc::SendMessage(), Mgr::Inquirer::sendResponse(), snmpConstructReponse(), SquidMain(), CacheManager::start(), Adaptation::AccessCheck::Start(), Rock::Rebuild::Start(), JobWaitBase::start_(), BodyPipe::startAutoConsumptionIfNeeded(), Ftp::StartGateway(), Ftp::StartRelay(), and Rock::SwapDir::updateHeaders().
|
protected |
Definition at line 614 of file PeerConnector.cc.
References asyncCallback, and certDownloadingDone().
|
overrideprotectedvirtual |
for debugging, starts with space
Reimplemented from AsyncJob.
Definition at line 578 of file PeerConnector.cc.
References MemBuf::append(), Packable::appendf(), MemBuf::content(), Comm::IsConnOpen(), MemBuf::reset(), and MemBuf::terminate().
|
protected |
Suspends TLS negotiation to download the missing certificates
| lastError | an error to handle when resuming negotiations |
Definition at line 730 of file PeerConnector.cc.
|
overrideprotectedvirtual |
Reimplemented from AsyncJob.
Definition at line 563 of file PeerConnector.cc.
References assert, ERR_GATEWAY_FAILURE, Http::scInternalServerError, and AsyncJob::swanSong().
|
pure virtualinherited |
Referenced by AsyncJob::callException(), and AsyncJob::callStart().
|
protected |
Definition at line 167 of file PeerConnector.h.
|
protected |
Definition at line 170 of file PeerConnector.h.
|
private |
Definition at line 216 of file PeerConnector.h.
|
private |
Definition at line 206 of file PeerConnector.h.
|
private |
Definition at line 200 of file PeerConnector.h.
Referenced by PeerConnector().
|
private |
Definition at line 210 of file PeerConnector.h.
|
inherited |
Definition at line 75 of file AsyncJob.h.
|
protectedinherited |
Definition at line 86 of file AsyncJob.h.
Referenced by AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::canBeCalled(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
|
private |
Definition at line 198 of file PeerConnector.h.
|
staticprivate |
Definition at line 192 of file PeerConnector.h.
|
staticprivate |
Definition at line 195 of file PeerConnector.h.
|
private |
Definition at line 201 of file PeerConnector.h.
| bool Security::PeerConnector::noteFwdPconnUse |
Definition at line 62 of file PeerConnector.h.
Referenced by FwdState::secureConnectionToPeer().
|
protected |
Definition at line 165 of file PeerConnector.h.
Referenced by Security::BlindPeerConnector::BlindPeerConnector(), and Ssl::PeekingPeerConnector::PeekingPeerConnector().
|
protected |
Definition at line 166 of file PeerConnector.h.
Referenced by PeerConnector(), and serverConnection().
|
protectedinherited |
Definition at line 88 of file AsyncJob.h.
Referenced by AsyncJob::~AsyncJob(), AsyncJob::callEnd(), and AsyncJob::Start().
|
private |
Definition at line 202 of file PeerConnector.h.
|
protectedinherited |
Definition at line 84 of file AsyncJob.h.
Referenced by AsyncJob::deleteThis(), AsyncJob::done(), AsyncJob::mustStop(), AsyncJob::status(), and HappyConnOpener::status().
|
private |
Definition at line 214 of file PeerConnector.h.
Referenced by isSuspended().
|
protectedinherited |
Definition at line 89 of file AsyncJob.h.
Referenced by AsyncJob::~AsyncJob(), and AsyncJob::callEnd().
|
protectedinherited |
Definition at line 85 of file AsyncJob.h.
Referenced by AsyncJob::AsyncJob(), Adaptation::Icap::Xaction::Xaction(), AsyncJob::~AsyncJob(), AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
|
private |
Definition at line 205 of file PeerConnector.h.
|
private |
whether the certificate validator should bypassed
Definition at line 203 of file PeerConnector.h.
Referenced by bypassCertValidator().