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
25 void *operator new(size_t);
26 void operator delete(void *);
29 ACLFilledChecklist(const acl_access
*, HttpRequest
*, const char *ident
);
30 ~ACLFilledChecklist();
33 /// The client connection manager
34 ConnStateData
* conn() const;
36 /// The client side fd. It uses conn() if available
40 void conn(ConnStateData
*);
41 /// set the client side FD
42 void fd(int aDescriptor
);
44 //int authenticated();
46 bool destinationDomainChecked() const;
47 void markDestinationDomainChecked();
48 bool sourceDomainChecked() const;
49 void markSourceDomainChecked();
52 virtual bool hasRequest() const { return request
!= NULL
; }
53 virtual bool hasReply() const { return reply
!= NULL
; }
65 char rfc931
[USER_IDENT_SZ
];
67 Auth::UserRequest::Pointer auth_user_request
;
74 /// SSL [certificate validation] errors, in undefined order
75 Ssl::Errors
*sslErrors
;
76 /// The peer certificate
77 Ssl::X509_Pointer serverCert
;
80 ExternalACLEntry
*extacl_entry
;
83 ConnStateData
* conn_
; /**< hack for ident and NTLM */
84 int fd_
; /**< may be available when conn_ is not */
85 bool destinationDomainChecked_
;
86 bool sourceDomainChecked_
;
87 /// not implemented; will cause link failures if used
88 ACLFilledChecklist(const ACLFilledChecklist
&);
89 /// not implemented; will cause link failures if used
90 ACLFilledChecklist
&operator=(const ACLFilledChecklist
&);
92 CBDATA_CLASS(ACLFilledChecklist
);
95 /// convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
97 ACLFilledChecklist
*Filled(ACLChecklist
*checklist
)
99 // this should always be safe because ACLChecklist is an abstract class
100 // and ACLFilledChecklist is its only [concrete] child
101 return dynamic_cast<ACLFilledChecklist
*>(checklist
);
104 #endif /* SQUID_ACLFILLED_CHECKLIST_H */