CertError.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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#ifndef SQUID_SRC_SECURITY_CERTERROR_H
10#define SQUID_SRC_SECURITY_CERTERROR_H
11
12#include "security/forward.h"
13
14namespace Security
15{
16
20{
21public:
22 CertError(int anErr, const Security::CertPointer &aCert, int aDepth = -1) :
23 code(anErr), cert(aCert), depth(aDepth)
24 {}
25
26 bool operator == (const CertError &ce) const {
27 // We expect to be used in contexts where identical certificates have
28 // identical pointers.
29 return code == ce.code && depth == ce.depth && cert == ce.cert;
30 }
31
32 bool operator != (const CertError &ce) const {
33 return !(*this == ce);
34 }
35
36public:
39
45 int depth;
46};
47
48} // namespace Security
49
50#endif /* SQUID_SRC_SECURITY_CERTERROR_H */
51
Security::ErrorCode code
certificate error code
Definition: CertError.h:37
bool operator==(const CertError &ce) const
Definition: CertError.h:26
Security::CertPointer cert
certificate with the above error code
Definition: CertError.h:38
CertError(int anErr, const Security::CertPointer &aCert, int aDepth=-1)
Definition: CertError.h:22
bool operator!=(const CertError &ce) const
Definition: CertError.h:32
Network/connection security abstraction layer.
Definition: Connection.h:34
int ErrorCode
Squid-defined error code (<0), an error code returned by X.509 API, or zero.
Definition: forward.h:128

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors