2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef SQUID_ACLFILLED_CHECKLIST_H
10 #define SQUID_ACLFILLED_CHECKLIST_H
12 #include "AccessLogEntry.h"
13 #include "acl/Checklist.h"
14 #include "acl/forward.h"
15 #include "base/CbcPointer.h"
17 #include "ip/Address.h"
19 #include "auth/UserRequest.h"
21 #include "security/CertError.h"
29 ACLChecklist filled with specific data, representing Squid and transaction
30 state for access checks along with some data-specific checking methods
32 class ACLFilledChecklist
: public ACLChecklist
34 CBDATA_CLASS(ACLFilledChecklist
);
38 ACLFilledChecklist(const acl_access
*, HttpRequest
*, const char *ident
);
39 ~ACLFilledChecklist();
42 /// The client connection manager
43 ConnStateData
* conn() const;
45 /// The client side fd. It uses conn() if available
49 void conn(ConnStateData
*);
50 /// set the client side FD
51 void fd(int aDescriptor
);
53 //int authenticated();
55 bool destinationDomainChecked() const;
56 void markDestinationDomainChecked();
57 bool sourceDomainChecked() const;
58 void markSourceDomainChecked();
61 virtual bool hasRequest() const { return request
!= NULL
; }
62 virtual bool hasReply() const { return reply
!= NULL
; }
63 virtual bool hasAle() const { return al
!= NULL
; }
64 virtual void syncAle() const;
76 char rfc931
[USER_IDENT_SZ
];
78 Auth::UserRequest::Pointer auth_user_request
;
84 /// SSL [certificate validation] errors, in undefined order
85 const Security::CertErrors
*sslErrors
;
86 /// The peer certificate
87 Security::CertPointer serverCert
;
89 AccessLogEntry::Pointer al
; ///< info for the future access.log, and external ACL
91 ExternalACLEntryPointer extacl_entry
;
93 err_type requestErrorType
;
96 ConnStateData
* conn_
; /**< hack for ident and NTLM */
97 int fd_
; /**< may be available when conn_ is not */
98 bool destinationDomainChecked_
;
99 bool sourceDomainChecked_
;
100 /// not implemented; will cause link failures if used
101 ACLFilledChecklist(const ACLFilledChecklist
&);
102 /// not implemented; will cause link failures if used
103 ACLFilledChecklist
&operator=(const ACLFilledChecklist
&);
106 /// convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
108 ACLFilledChecklist
*Filled(ACLChecklist
*checklist
)
110 // this should always be safe because ACLChecklist is an abstract class
111 // and ACLFilledChecklist is its only [concrete] child
112 return dynamic_cast<ACLFilledChecklist
*>(checklist
);
115 #endif /* SQUID_ACLFILLED_CHECKLIST_H */