1 #ifndef SQUID_ACLFILLED_CHECKLIST_H
2 #define SQUID_ACLFILLED_CHECKLIST_H
4 #include "acl/Checklist.h"
6 #include "auth/UserRequest.h"
9 #include "ssl/support.h"
12 class ExternalACLEntry
;
17 ACLChecklist filled with specific data, representing Squid and transaction
18 state for access checks along with some data-specific checking methods */
19 class ACLFilledChecklist
: public ACLChecklist
22 void *operator new(size_t);
23 void operator delete(void *);
26 ACLFilledChecklist(const acl_access
*, HttpRequest
*, const char *ident
);
27 ~ACLFilledChecklist();
30 ConnStateData
* conn() const;
32 /// uses conn() if available
36 void conn(ConnStateData
*);
38 void fd(int aDescriptor
);
40 //int authenticated();
42 bool destinationDomainChecked() const;
43 void markDestinationDomainChecked();
44 bool sourceDomainChecked() const;
45 void markSourceDomainChecked();
48 virtual bool hasRequest() const { return request
!= NULL
; }
49 virtual bool hasReply() const { return reply
!= NULL
; }
55 struct peer
*dst_peer
;
61 char rfc931
[USER_IDENT_SZ
];
63 Auth::UserRequest::Pointer auth_user_request
;
70 /// SSL [certificate validation] errors, in undefined order
71 Ssl::Errors
*sslErrors
;
72 /// The peer certificate
73 Ssl::X509_Pointer serverCert
;
76 ExternalACLEntry
*extacl_entry
;
79 ConnStateData
* conn_
; /**< hack for ident and NTLM */
80 int fd_
; /**< may be available when conn_ is not */
81 bool destinationDomainChecked_
;
82 bool sourceDomainChecked_
;
83 /// not implemented; will cause link failures if used
84 ACLFilledChecklist(const ACLFilledChecklist
&);
85 /// not implemented; will cause link failures if used
86 ACLFilledChecklist
&operator=(const ACLFilledChecklist
&);
88 CBDATA_CLASS(ACLFilledChecklist
);
91 /// convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
93 ACLFilledChecklist
*Filled(ACLChecklist
*checklist
)
95 // this should always be safe because ACLChecklist is an abstract class
96 // and ACLFilledChecklist is its only [concrete] child
97 return dynamic_cast<ACLFilledChecklist
*>(checklist
);
100 #endif /* SQUID_ACLFILLED_CHECKLIST_H */