AtStepData.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 #include "squid.h"
10 
11 #if USE_OPENSSL
12 
13 #include "acl/AtStepData.h"
14 #include "acl/Checklist.h"
15 #include "cache_cf.h"
16 #include "ConfigParser.h"
17 #include "Debug.h"
18 #include "wordlist.h"
19 
21 {}
22 
24 {
25  values.assign(old.values.begin(), old.values.end());
26 }
27 
29 {
30 }
31 
32 bool
34 {
35  for (std::list<Ssl::BumpStep>::const_iterator it = values.begin(); it != values.end(); ++it) {
36  if (*it == toFind)
37  return true;
38  }
39  return false;
40 }
41 
44 {
45  SBufList sl;
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" : "???"));
50  }
51  return sl;
52 }
53 
54 void
56 {
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);
64  } else {
65  debugs(28, DBG_CRITICAL, "FATAL: invalid AtStep step: " << t);
66  self_destruct();
67  }
68  }
69 }
70 
71 bool
73 {
74  return values.empty();
75 }
76 
79 {
80  return new ACLAtStepData(*this);
81 }
82 
83 #endif /* USE_OPENSSL */
84 
std::list< Ssl::BumpStep > values
Definition: AtStepData.h:35
Definition: SBuf.h:87
void self_destruct(void)
Definition: cache_cf.cc:255
#define DBG_CRITICAL
Definition: Debug.h:44
BumpStep
Definition: support.h:127
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Debug.h:123
bool empty() const
Definition: AtStepData.cc:72
virtual ACLAtStepData * clone() const
Definition: AtStepData.cc:78
std::list< SBuf > SBufList
Definition: forward.h:26
virtual ~ACLAtStepData()
Definition: AtStepData.cc:28
static char * strtokFile()
Definition: ConfigParser.cc:82
virtual SBufList dump() const
Definition: AtStepData.cc:43
void parse()
Definition: AtStepData.cc:55
bool match(Ssl::BumpStep)
Definition: AtStepData.cc:33

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors