Botan  2.11.0
Crypto and TLS for C++11
cert_status.cpp
Go to the documentation of this file.
1 /*
2 * (C) 2016 Jack Lloyd
3 *
4 * Botan is released under the Simplified BSD License (see license.txt)
5 */
6 
7 #include <botan/cert_status.h>
8 
9 namespace Botan {
10 
11 //static
13  {
14  switch(code)
15  {
17  return "Verified";
19  return "OCSP response accepted as affirming unrevoked status for certificate";
21  return "Signature on OCSP response was found valid";
23  return "Valid CRL examined";
24 
26  return "Certificate serial number is negative";
28  return "Distinguished name too long";
30  return "OCSP URL not available";
32  return "OSCP server not available";
33 
35  return "No revocation data";
37  return "Signature method too weak";
39  return "Hash function used is considered too weak for security";
40 
42  return "Certificate is not yet valid";
44  return "Certificate has expired";
46  return "OCSP is not yet valid";
48  return "OCSP response has expired";
50  return "OCSP response is too old";
52  return "CRL response is not yet valid";
54  return "CRL has expired";
55 
57  return "Certificate issuer not found";
59  return "Cannot establish trust";
61  return "Loop in certificate chain";
63  return "Certificate chain does not end in a CA certificate";
65  return "Certificate issuer does not match subject of issuing cert";
66 
68  return "Certificate policy error";
70  return "Certificate contains duplicate policy";
72  return "Certificate does not allow the requested usage";
74  return "Certificate chain too long";
76  return "CA certificate not allowed to issue certs";
78  return "CA certificate not allowed to issue CRLs";
80  return "No CRL with matching distribution point for certificate";
82  return "OCSP cert not listed";
84  return "OCSP bad status";
86  return "Certificate does not match provided name";
88  return "Certificate does not pass name constraint";
90  return "Unknown critical extension encountered";
92  return "Duplicate certificate extension encountered";
94  return "Encountered extension in certificate with version < 3";
96  return "OCSP signature error";
98  return "Unable to find certificate issusing OCSP response";
100  return "OCSP issuer's keyusage prohibits OCSP";
102  return "OCSP parsing valid";
104  return "OCSP requests not available, no HTTP support compiled in";
106  return "Certificate is revoked";
108  return "CRL bad signature";
110  return "Signature error";
112  return "Certificate public key invalid";
114  return "Certificate signed with unknown/unavailable algorithm";
116  return "Certificate signature has invalid parameters";
117 
118  // intentionally no default so we are warned if new enum values are added
119  }
120 
121  return nullptr;
122  }
123 
124 }
std::string to_string(ErrorType type)
Convert an ErrorType to string.
Definition: exceptn.cpp:11
Definition: alg_id.cpp:13
Certificate_Status_Code
Definition: cert_status.h:19