]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/AtStepData.cc
e2ff673e917c9494f609f1a1184c727a62e198fa
2 * Copyright (C) 1996-2014 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"
19 ACLAtStepData::ACLAtStepData()
22 ACLAtStepData::ACLAtStepData(ACLAtStepData
const &old
)
24 values
.assign(old
.values
.begin(), old
.values
.end());
27 ACLAtStepData::~ACLAtStepData()
32 ACLAtStepData::match(Ssl::BumpStep toFind
)
34 for (std::list
<Ssl::BumpStep
>::const_iterator it
= values
.begin(); it
!= values
.end(); ++it
) {
42 ACLAtStepData::dump() const
45 for (std::list
<Ssl::BumpStep
>::const_iterator it
= values
.begin(); it
!= values
.end(); ++it
) {
46 sl
.push_back(SBuf(*it
== Ssl::bumpStep1
? "SslBump1" :
47 *it
== Ssl::bumpStep2
? "SslBump2" :
48 *it
== Ssl::bumpStep3
? "SslBump3" : "???"));
54 ACLAtStepData::parse()
56 while (const char *t
= strtokFile()) {
57 if (strcasecmp(t
, "SslBump1") == 0) {
58 values
.push_back(Ssl::bumpStep1
);
59 } else if (strcasecmp(t
, "SslBump2") == 0) {
60 values
.push_back(Ssl::bumpStep2
);
61 } else if (strcasecmp(t
, "SslBump3") == 0) {
62 values
.push_back(Ssl::bumpStep3
);
64 debugs(28, DBG_CRITICAL
, "FATAL: invalid AtStep step: " << t
);
71 ACLAtStepData::empty() const
73 return values
.empty();
77 ACLAtStepData::clone() const
79 return new ACLAtStepData(*this);
82 #endif /* USE_OPENSSL */