1 #ifndef SQUID_ACLFILLED_CHECKLIST_H
2 #define SQUID_ACLFILLED_CHECKLIST_H
4 #include "acl/Checklist.h"
5 #include "ip/Address.h"
7 #include "auth/UserRequest.h"
10 #include "ssl/support.h"
15 class ExternalACLEntry
;
20 ACLChecklist filled with specific data, representing Squid and transaction
21 state for access checks along with some data-specific checking methods */
22 class ACLFilledChecklist
: public ACLChecklist
26 ACLFilledChecklist(const acl_access
*, HttpRequest
*, const char *ident
);
27 ~ACLFilledChecklist();
30 /// The client connection manager
31 ConnStateData
* conn() const;
33 /// The client side fd. It uses conn() if available
37 void conn(ConnStateData
*);
38 /// set the client side FD
39 void fd(int aDescriptor
);
41 //int authenticated();
43 bool destinationDomainChecked() const;
44 void markDestinationDomainChecked();
45 bool sourceDomainChecked() const;
46 void markSourceDomainChecked();
49 virtual bool hasRequest() const { return request
!= NULL
; }
50 virtual bool hasReply() const { return reply
!= NULL
; }
62 char rfc931
[USER_IDENT_SZ
];
64 Auth::UserRequest::Pointer auth_user_request
;
71 /// SSL [certificate validation] errors, in undefined order
72 Ssl::Errors
*sslErrors
;
73 /// The peer certificate
74 Ssl::X509_Pointer serverCert
;
77 ExternalACLEntry
*extacl_entry
;
80 ConnStateData
* conn_
; /**< hack for ident and NTLM */
81 int fd_
; /**< may be available when conn_ is not */
82 bool destinationDomainChecked_
;
83 bool sourceDomainChecked_
;
84 /// not implemented; will cause link failures if used
85 ACLFilledChecklist(const ACLFilledChecklist
&);
86 /// not implemented; will cause link failures if used
87 ACLFilledChecklist
&operator=(const ACLFilledChecklist
&);
89 CBDATA_CLASS2(ACLFilledChecklist
);
92 /// convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
94 ACLFilledChecklist
*Filled(ACLChecklist
*checklist
)
96 // this should always be safe because ACLChecklist is an abstract class
97 // and ACLFilledChecklist is its only [concrete] child
98 return dynamic_cast<ACLFilledChecklist
*>(checklist
);
101 #endif /* SQUID_ACLFILLED_CHECKLIST_H */