CertError.h
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 #ifndef SQUID_SRC_SECURITY_CERTERROR_H
10 #define SQUID_SRC_SECURITY_CERTERROR_H
11 
12 #include "security/forward.h"
13 
14 namespace Security
15 {
16 
19 class CertError
20 {
21 public:
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 
36 public:
38  Security::CertPointer cert;
39 
45  int depth;
46 };
47 
48 } // namespace Security
49 
50 #endif /* SQUID_SRC_SECURITY_CERTERROR_H */
51 
int ErrorCode
Squid defined error code (<0), an error code returned by X.509 API, or SSL_ERROR_NONE.
Definition: forward.h:116
Security::CertPointer cert
certificate with the above error code
Definition: CertError.h:38
bool operator!=(const CertError &ce) const
Definition: CertError.h:32
Security::ErrorCode code
certificate error code
Definition: CertError.h:37
CertError(int anErr, const Security::CertPointer &aCert, int aDepth=-1)
Definition: CertError.h:22
bool operator==(const CertError &ce) const
Definition: CertError.h:26

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors