PeerConnector.h
Go to the documentation of this file.
183 Security::CertErrors *sslCrtvdCheckForErrors(Ssl::CertValidationResponse const &, ErrorDetailPointer &);
void error(char *format,...)
Definition: FilledChecklist.h:32
Definition: AccessLogEntry.h:41
an interface for those capable of configuring an ACLFilledChecklist object
Definition: ChecklistFiller.h:19
a smart AsyncCall pointer for delivery of future results
Definition: AsyncCallbacks.h:32
Definition: AsyncJob.h:32
Definition: CbDataList.h:16
Definition: CbcPointer.h:26
Definition: CommCalls.h:128
Definition: CommCalls.h:134
Definition: Downloader.h:46
Definition: errorpage.h:89
Definition: DiskThreadsDiskFile.h:71
Definition: EncryptorAnswer.h:22
manages collecting and logging secrets of a TLS connection to tls_key_log
Definition: KeyLogger.h:24
Definition: PeerConnector.h:49
virtual void noteNegotiationDone(ErrorState *)
Definition: PeerConnector.h:131
Ssl::X509_STACK_Pointer downloadedCerts
successfully downloaded intermediate certificates (omitted by the peer)
Definition: PeerConnector.h:210
void negotiateSsl()
Comm::SetSelect() callback. Direct calls tickle/resume negotiations.
Definition: PeerConnector.cc:449
void commCloseHandler(const CommCloseCbParams ¶ms)
The comm_close callback handler.
Definition: PeerConnector.cc:107
void sslCrtvdHandleReply(Ssl::CertValidationResponsePointer &)
Process response from cert validator helper.
Definition: PeerConnector.cc:332
AsyncCall::Pointer closeHandler
we call this when the connection closed
Definition: PeerConnector.h:200
CBDATA_INTERMEDIATE()
void startCertDownloading(SBuf &url)
Start downloading procedure for the given URL.
Definition: PeerConnector.cc:614
virtual bool initialize(Security::SessionPointer &)
Definition: PeerConnector.cc:137
bool noteFwdPconnUse
hack: whether the connection requires fwdPconnPool->noteUses()
Definition: PeerConnector.h:62
PeerConnector(const Comm::ConnectionPointer &aServerConn, const AsyncCallback< EncryptorAnswer > &, const AccessLogEntryPointer &alp, const time_t timeout=0)
Definition: PeerConnector.cc:38
JobWait< Downloader > certDownloadWait
waits for the missing certificate to be downloaded
Definition: PeerConnector.h:216
void countFailingConnection(const ErrorState *)
updates connection usage history before the connection is closed
Definition: PeerConnector.cc:528
virtual Security::ContextPointer getTlsContext()=0
virtual void noteNegotiationError(const Security::ErrorDetailPointer &)
Called when the SSL_connect function aborts with an SSL negotiation error.
Definition: PeerConnector.cc:485
EncryptorAnswer & answer()
convenience method to get to the answer fields
Definition: PeerConnector.cc:497
~PeerConnector() override
bool computeMissingCertificateUrls(const Connection &)
finds URLs of (some) missing intermediate certificates or returns false
Definition: PeerConnector.cc:706
void handleMissingCertificates(const Security::IoResult &lastError)
Either initiates fetching of missing certificates or bails with an error.
Definition: PeerConnector.cc:680
std::queue< SBuf > urlsOfMissingCerts
The list of URLs where missing certificates should be downloaded.
Definition: PeerConnector.h:205
PeerConnector & operator=(const PeerConnector &)
Security::IoResultPointer suspendedError_
outcome of the last (failed and) suspended negotiation attempt (or nil)
Definition: PeerConnector.h:214
void resumeNegotiation()
Resumes TLS negotiation paused by suspendNegotiation()
Definition: PeerConnector.cc:735
static const unsigned int MaxNestedDownloads
The maximum number of inter-dependent Downloader jobs a worker may initiate.
Definition: PeerConnector.h:195
void start() override
Preps connection and SSL state. Calls negotiate().
Definition: PeerConnector.cc:68
PeerConnector(const PeerConnector &)
Comm::ConnectionPointer const & serverConnection() const
mimics FwdState to minimize changes to FwdState::initiate/negotiateSsl
Definition: PeerConnector.h:138
void handleNegotiationResult(const Security::IoResult &)
Called after each negotiation step to handle the result.
Definition: PeerConnector.cc:257
void commTimeoutHandler(const CommTimeoutCbParams &)
The connection read timeout callback handler.
Definition: PeerConnector.cc:127
void bypassCertValidator()
If called the certificates validator will not used.
Definition: PeerConnector.h:156
void fillChecklist(ACLFilledChecklist &) const override
configure the given checklist (to reflect the current transaction state)
Definition: PeerConnector.cc:89
Security::KeyLogger keyLogger
managers logging of the being-established TLS connection secrets
Definition: PeerConnector.h:198
static void NegotiateSsl(int fd, void *data)
A wrapper for Comm::SetSelect() notifications.
Definition: PeerConnector.cc:439
void disconnect()
a bail(), sendSuccess() helper: stops monitoring the connection
Definition: PeerConnector.cc:538
unsigned int certsDownloads
the number of downloaded missing certificates
Definition: PeerConnector.h:206
bool isSuspended() const
Whether TLS negotiation has been paused and not yet resumed.
Definition: PeerConnector.h:101
void certDownloadingDone(DownloaderAnswer &)
Called by Downloader after a certificate object downloaded.
Definition: PeerConnector.cc:624
unsigned int certDownloadNestingLevel() const
the number of concurrent PeerConnector jobs waiting for us
Definition: PeerConnector.cc:601
void callBack()
a bail(), sendSuccess() helper: sends results to the initiator
Definition: PeerConnector.cc:555
static const unsigned int MaxCertsDownloads
The maximum number of missing certificates a single PeerConnector may download.
Definition: PeerConnector.h:192
void suspendNegotiation(const Security::IoResult &lastError)
Definition: PeerConnector.cc:725
const char * status() const override
internal cleanup; do not call directly
Definition: PeerConnector.cc:578
Security::CertErrors * sslCrtvdCheckForErrors(Ssl::CertValidationResponse const &, ErrorDetailPointer &)
Check SSL errors returned from cert validator against sslproxy_cert_error access list.
Definition: PeerConnector.cc:383
void recordNegotiationDetails()
Definition: PeerConnector.cc:191
std::unique_ptr< STACK_OF(X509), sk_X509_free_wrapper > X509_STACK_Pointer
Definition: gadgets.h:50