]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/AtStepData.cc
2 * Copyright (C) 1996-2016 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.
13 #include "acl/AtStepData.h"
14 #include "acl/Checklist.h"
16 #include "ConfigParser.h"
20 ACLAtStepData::ACLAtStepData()
23 ACLAtStepData::ACLAtStepData(ACLAtStepData
const &old
)
25 values
.assign(old
.values
.begin(), old
.values
.end());
28 ACLAtStepData::~ACLAtStepData()
33 ACLAtStepData::match(Ssl::BumpStep toFind
)
35 for (std::list
<Ssl::BumpStep
>::const_iterator it
= values
.begin(); it
!= values
.end(); ++it
) {
43 ACLAtStepData::dump() const
46 for (std::list
<Ssl::BumpStep
>::const_iterator it
= values
.begin(); it
!= values
.end(); ++it
) {
47 sl
.push_back(SBuf(*it
== Ssl::bumpStep1
? "SslBump1" :
48 *it
== Ssl::bumpStep2
? "SslBump2" :
49 *it
== Ssl::bumpStep3
? "SslBump3" : "???"));
55 ACLAtStepData::parse()
57 while (const char *t
= ConfigParser::strtokFile()) {
58 if (strcasecmp(t
, "SslBump1") == 0) {
59 values
.push_back(Ssl::bumpStep1
);
60 } else if (strcasecmp(t
, "SslBump2") == 0) {
61 values
.push_back(Ssl::bumpStep2
);
62 } else if (strcasecmp(t
, "SslBump3") == 0) {
63 values
.push_back(Ssl::bumpStep3
);
65 debugs(28, DBG_CRITICAL
, "FATAL: invalid AtStep step: " << t
);
72 ACLAtStepData::empty() const
74 return values
.empty();
78 ACLAtStepData::clone() const
80 return new ACLAtStepData(*this);
83 #endif /* USE_OPENSSL */