From: Christos Tsantilas Date: Tue, 25 Sep 2012 13:46:57 +0000 (+0300) Subject: Undo/uncommit the r12328 patch X-Git-Tag: SQUID_3_3_0_1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66700ae5448a039974428cdcde3bea67d605567e;p=thirdparty%2Fsquid.git Undo/uncommit the r12328 patch The documentation is wrong and should applied as separate patches --- diff --git a/src/acl/FilledChecklist.h b/src/acl/FilledChecklist.h index 057aee5d8e..6c926d85ed 100644 --- a/src/acl/FilledChecklist.h +++ b/src/acl/FilledChecklist.h @@ -27,15 +27,14 @@ public: ~ACLFilledChecklist(); public: - /// The client connection manager ConnStateData * conn() const; - /// The client side fd. It uses conn() if available + /// uses conn() if available int fd() const; /// set either conn void conn(ConnStateData *); - /// set the client side FD + /// set FD void fd(int aDescriptor); //int authenticated(); diff --git a/src/client_side.cc b/src/client_side.cc index 1ad470d08b..84db45fc67 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -2516,6 +2516,8 @@ bool ConnStateData::serveDelayedError(ClientSocketContext *context) ACLFilledChecklist check(Config.ssl_client.cert_error, request, dash_str); check.sslErrors = new Ssl::Errors(SQUID_X509_V_ERR_DOMAIN_MISMATCH); + if (Comm::IsConnOpen(pinning.serverConnection)) + check.fd(pinning.serverConnection->fd); const bool allowDomainMismatch = check.fastCheck() == ACCESS_ALLOWED; delete check.sslErrors; diff --git a/src/forward.cc b/src/forward.cc index 75da0f3583..4ad233451e 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -214,12 +214,6 @@ FwdState::completed() assert(err); errorAppendEntry(entry, err); err = NULL; -#if USE_SSL - if (request->flags.sslPeek && request->clientConnectionManager.valid()) { - CallJobHere1(17, 4, request->clientConnectionManager, ConnStateData, - ConnStateData::httpsPeeked, Comm::ConnectionPointer(NULL)); - } -#endif } else { EBIT_CLR(entry->flags, ENTRY_FWD_HDR_WAIT); entry->complete(); @@ -375,6 +369,14 @@ FwdState::startConnectionOrFail() ErrorState *anErr = new ErrorState(ERR_CANNOT_FORWARD, HTTP_INTERNAL_SERVER_ERROR, request); fail(anErr); } // else use actual error from last connection attempt +#if USE_SSL + if (request->flags.sslPeek && request->clientConnectionManager.valid()) { + errorAppendEntry(entry, err); // will free err + err = NULL; + CallJobHere1(17, 4, request->clientConnectionManager, ConnStateData, + ConnStateData::httpsPeeked, Comm::ConnectionPointer(NULL)); + } +#endif self = NULL; // refcounted } } @@ -826,6 +828,7 @@ FwdState::initiateSSL() // The list is used in ssl_verify_cb() and is freed in ssl_free(). if (acl_access *acl = Config.ssl_client.cert_error) { ACLFilledChecklist *check = new ACLFilledChecklist(acl, request, dash_str); + check->fd(fd); SSL_set_ex_data(ssl, ssl_ex_index_cert_error_check, check); }