1 #ifndef SQUID_ACLFILLED_CHECKLIST_H
2 #define SQUID_ACLFILLED_CHECKLIST_H
4 #include "acl/Checklist.h"
5 #include "acl/forward.h"
6 #include "ip/Address.h"
8 #include "auth/UserRequest.h"
11 #include "ssl/support.h"
16 class ExternalACLEntry
;
21 ACLChecklist filled with specific data, representing Squid and transaction
22 state for access checks along with some data-specific checking methods */
23 class ACLFilledChecklist
: public ACLChecklist
27 ACLFilledChecklist(const acl_access
*, HttpRequest
*, const char *ident
);
28 ~ACLFilledChecklist();
31 /// The client connection manager
32 ConnStateData
* conn() const;
34 /// The client side fd. It uses conn() if available
38 void conn(ConnStateData
*);
39 /// set the client side FD
40 void fd(int aDescriptor
);
42 //int authenticated();
44 bool destinationDomainChecked() const;
45 void markDestinationDomainChecked();
46 bool sourceDomainChecked() const;
47 void markSourceDomainChecked();
50 virtual bool hasRequest() const { return request
!= NULL
; }
51 virtual bool hasReply() const { return reply
!= NULL
; }
63 char rfc931
[USER_IDENT_SZ
];
65 Auth::UserRequest::Pointer auth_user_request
;
72 /// SSL [certificate validation] errors, in undefined order
73 Ssl::Errors
*sslErrors
;
74 /// The peer certificate
75 Ssl::X509_Pointer serverCert
;
78 ExternalACLEntry
*extacl_entry
;
81 ConnStateData
* conn_
; /**< hack for ident and NTLM */
82 int fd_
; /**< may be available when conn_ is not */
83 bool destinationDomainChecked_
;
84 bool sourceDomainChecked_
;
85 /// not implemented; will cause link failures if used
86 ACLFilledChecklist(const ACLFilledChecklist
&);
87 /// not implemented; will cause link failures if used
88 ACLFilledChecklist
&operator=(const ACLFilledChecklist
&);
90 CBDATA_CLASS2(ACLFilledChecklist
);
93 /// convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
95 ACLFilledChecklist
*Filled(ACLChecklist
*checklist
)
97 // this should always be safe because ACLChecklist is an abstract class
98 // and ACLFilledChecklist is its only [concrete] child
99 return dynamic_cast<ACLFilledChecklist
*>(checklist
);
102 #endif /* SQUID_ACLFILLED_CHECKLIST_H */