]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/SslErrorData.cc
8ca619589dd4f02638bc3ca302ef6a7f9ee1c377
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.
10 #include "acl/Checklist.h"
11 #include "acl/SslErrorData.h"
15 ACLSslErrorData::ACLSslErrorData() : values (NULL
)
18 ACLSslErrorData::ACLSslErrorData(ACLSslErrorData
const &old
) : values (NULL
)
23 ACLSslErrorData::~ACLSslErrorData()
30 ACLSslErrorData::match(const Ssl::CertErrors
*toFind
)
32 for (const Ssl::CertErrors
*err
= toFind
; err
; err
= err
->next
) {
33 if (values
->findAndTune(err
->element
.code
))
39 /* explicit instantiation required for some systems */
40 /** \cond AUTODOCS_IGNORE */
41 // AYJ: 2009-05-20 : Removing. clashes with template <int> instantiation for other ACLs.
42 // template cbdata_type Ssl::Errors::CBDATA_CbDataList;
46 ACLSslErrorData::dump() const
49 Ssl::Errors
*data
= values
;
50 while (data
!= NULL
) {
51 sl
.push_back(SBuf(Ssl::GetErrorName(data
->element
)));
58 ACLSslErrorData::parse()
63 for (Tail
= &values
; *Tail
; Tail
= &((*Tail
)->next
));
64 while ((t
= strtokFile())) {
65 Ssl::Errors
*q
= Ssl::ParseErrorString(t
);
67 Tail
= &q
->tail()->next
;
72 ACLSslErrorData::empty() const
74 return values
== NULL
;
78 ACLSslErrorData::clone() const
80 /* Splay trees don't clone yet. */
82 return new ACLSslErrorData(*this);