]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/ConnectionsEncrypted.cc
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 /* DEBUG: section 28 Access Control */
12 #include "acl/ConnectionsEncrypted.h"
13 #include "acl/FilledChecklist.h"
15 #include "HttpReply.h"
16 #include "HttpRequest.h"
17 #include "SquidConfig.h"
20 Acl::ConnectionsEncrypted::clone() const
22 return new Acl::ConnectionsEncrypted(*this);
25 Acl::ConnectionsEncrypted::ConnectionsEncrypted (char const *theClass
) : class_ (theClass
)
28 Acl::ConnectionsEncrypted::ConnectionsEncrypted (Acl::ConnectionsEncrypted
const & old
) :class_ (old
.class_
)
31 Acl::ConnectionsEncrypted::~ConnectionsEncrypted()
35 Acl::ConnectionsEncrypted::typeString() const
41 Acl::ConnectionsEncrypted::empty () const
47 Acl::ConnectionsEncrypted::parse()
49 if (ConfigParser::strtokFile()) {
50 debugs(89, DBG_CRITICAL
, "WARNING: connections_encrypted does not accepts any value.");
55 Acl::ConnectionsEncrypted::match(ACLChecklist
*checklist
)
57 if (!checklist
->hasRequest()) {
58 debugs(28, DBG_IMPORTANT
, "WARNING: " << name
<< " ACL is used in " <<
59 "context without an HTTP request. Assuming mismatch.");
63 ACLFilledChecklist
*filled
= Filled((ACLChecklist
*)checklist
);
65 const bool safeRequest
=
66 !(filled
->request
->sources
& HttpMsg::srcUnsafe
);
67 const bool safeReply
= !filled
->reply
||
68 !(filled
->reply
->sources
& HttpMsg::srcUnsafe
);
70 return (safeRequest
&& safeReply
) ? 1 : 0;
74 Acl::ConnectionsEncrypted::dump() const