--------------------- PatchSet 6078 Date: 2007/11/05 17:50:54 Author: rousskov Branch: ssl-bump Tag: (none) Log: Store connection file descriptor, to be used to get to the connection SSL structure when client-side ConnStateData is not available. Store SSL error code, to be used by ssl_error ACL (ACLSslError*). Members: src/ACLChecklist.cc:1.39->1.39.6.1 src/ACLChecklist.h:1.28->1.28.6.1 Index: squid3/src/ACLChecklist.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLChecklist.cc,v retrieving revision 1.39 retrieving revision 1.39.6.1 diff -u -r1.39 -r1.39.6.1 --- squid3/src/ACLChecklist.cc 1 Sep 2007 06:51:11 -0000 1.39 +++ squid3/src/ACLChecklist.cc 5 Nov 2007 17:50:54 -0000 1.39.6.1 @@ -1,5 +1,5 @@ /* - * $Id: ACLChecklist.cc,v 1.39 2007/09/01 06:51:11 squidadm Exp $ + * $Id: ACLChecklist.cc,v 1.39.6.1 2007/11/05 17:50:54 rousskov Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -362,10 +362,14 @@ #if SQUID_SNMP snmp_community(NULL), #endif +#if USE_SSL + ssl_error(0), +#endif callback (NULL), callback_data (NULL), extacl_entry (NULL), conn_(NULL), + fd_(-1), async_(false), finished_(false), allow_(ACCESS_DENIED), @@ -422,6 +426,19 @@ conn_ = aConn; } +int +ACLChecklist::fd() const +{ + return conn_ != NULL ? conn_->fd : fd_; +} + +void +ACLChecklist::fd(int aDescriptor) +{ + assert(!conn() || conn()->fd == aDescriptor); + fd_ = aDescriptor; +} + void ACLChecklist::AsyncState::changeState (ACLChecklist *checklist, AsyncState *newState) const { Index: squid3/src/ACLChecklist.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLChecklist.h,v retrieving revision 1.28 retrieving revision 1.28.6.1 diff -u -r1.28 -r1.28.6.1 --- squid3/src/ACLChecklist.h 1 Sep 2007 06:51:11 -0000 1.28 +++ squid3/src/ACLChecklist.h 5 Nov 2007 17:55:44 -0000 1.28.6.1 @@ -1,6 +1,6 @@ /* - * $Id: ACLChecklist.h,v 1.28 2007/09/01 06:51:11 squidadm Exp $ + * $Id: ACLChecklist.h,v 1.28.6.1 2007/11/05 17:55:44 rousskov Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -97,8 +97,14 @@ void checkCallback(allow_t answer); void preCheck(); _SQUID_INLINE_ bool matchAclListFast(const ACLList * list); + ConnStateData::Pointer conn(); + int fd() const; // uses conn() if available + + // set either conn or FD void conn(ConnStateData::Pointer); + void fd(int aDescriptor); + int authenticated(); bool asyncInProgress() const; @@ -131,6 +137,10 @@ char *snmp_community; #endif +#if USE_SSL + int ssl_error; +#endif + PF *callback; void *callback_data; ExternalACLEntry *extacl_entry; @@ -144,6 +154,7 @@ void matchAclListSlow(const ACLList * list); CBDATA_CLASS(ACLChecklist); ConnStateData::Pointer conn_; /* hack for ident and NTLM */ + int fd_; // may be available when conn_ is not bool async_; bool finished_; allow_t allow_;