ConnectionsEncrypted.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3  *
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.
7  */
8 
9 /* DEBUG: section 28 Access Control */
10 
11 #include "squid.h"
13 #include "acl/FilledChecklist.h"
14 #include "Debug.h"
15 #include "HttpReply.h"
16 #include "HttpRequest.h"
17 #include "SquidConfig.h"
18 
19 ACL *
21 {
22  return new Acl::ConnectionsEncrypted(*this);
23 }
24 
25 Acl::ConnectionsEncrypted::ConnectionsEncrypted (char const *theClass) : class_ (theClass)
26 {}
27 
29 {}
30 
32 {}
33 
34 char const *
36 {
37  return class_;
38 }
39 
40 bool
42 {
43  return false;
44 }
45 
46 void
48 {
50  debugs(89, DBG_CRITICAL, "WARNING: connections_encrypted does not accepts any value.");
51  }
52 }
53 
54 int
56 {
57  if (!checklist->hasRequest()) {
58  debugs(28, DBG_IMPORTANT, "WARNING: " << name << " ACL is used in " <<
59  "context without an HTTP request. Assuming mismatch.");
60  return 0;
61  }
62 
63  ACLFilledChecklist *filled = Filled((ACLChecklist*)checklist);
64 
65  const bool safeRequest =
67  const bool safeReply = !filled->reply ||
69 
70  return (safeRequest && safeReply) ? 1 : 0;
71 }
72 
75 {
76  return SBufList();
77 }
78 
virtual char const * typeString() const
ACLFilledChecklist * Filled(ACLChecklist *checklist)
convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
Definition: Acl.h:39
virtual int match(ACLChecklist *checklist)
Matches the actual data in checklist against this ACL.
#define DBG_CRITICAL
Definition: Debug.h:44
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Debug.h:123
#define DBG_IMPORTANT
Definition: Debug.h:45
virtual bool hasRequest() const =0
virtual void parse()
parses node represenation in squid.conf; dies on failures
virtual SBufList dump() const
std::list< SBuf > SBufList
Definition: forward.h:26
virtual bool empty() const
HttpRequest * request
virtual ACL * clone() const
static char * strtokFile()
Definition: ConfigParser.cc:82
Unsafe sources mask.
Definition: Message.h:44
uint32_t sources
The message sources.
Definition: Message.h:99

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors