ConnectionsEncrypted.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2022 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/Stream.h"
15 #include "HttpReply.h"
16 #include "HttpRequest.h"
17 #include "SquidConfig.h"
18 
19 Acl::ConnectionsEncrypted::ConnectionsEncrypted (char const *theClass) : class_ (theClass)
20 {}
21 
23 {}
24 
25 char const *
27 {
28  return class_;
29 }
30 
31 bool
33 {
34  return false;
35 }
36 
37 void
39 {
41  debugs(89, DBG_CRITICAL, "WARNING: connections_encrypted does not accept any value.");
42  }
43 }
44 
45 int
47 {
48  if (!checklist->hasRequest()) {
49  debugs(28, DBG_IMPORTANT, "WARNING: " << name << " ACL is used in " <<
50  "context without an HTTP request. Assuming mismatch.");
51  return 0;
52  }
53 
54  ACLFilledChecklist *filled = Filled((ACLChecklist*)checklist);
55 
56  const bool safeRequest =
58  const bool safeReply = !filled->reply ||
60 
61  return (safeRequest && safeReply) ? 1 : 0;
62 }
63 
66 {
67  return SBufList();
68 }
69 
#define DBG_CRITICAL
Definition: Stream.h:40
static char * strtokFile()
Definition: ConfigParser.cc:64
std::list< SBuf > SBufList
Definition: forward.h:22
virtual void parse()
parses node representation in squid.conf; dies on failures
ACLFilledChecklist * Filled(ACLChecklist *checklist)
convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
virtual bool hasRequest() const =0
virtual int match(ACLChecklist *checklist)
Matches the actual data in checklist against this ACL.
virtual SBufList dump() const
HttpRequest * request
uint32_t sources
The message sources.
Definition: Message.h:100
@ srcUnsafe
Unsafe sources mask.
Definition: Message.h:45
#define DBG_IMPORTANT
Definition: Stream.h:41
virtual char const * typeString() const
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:196

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors