Botan  2.6.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 "CRL response is not yet valid";
52  return "CRL has expired";
53 
55  return "Certificate issuer not found";
57  return "Cannot establish trust";
59  return "Loop in certificate chain";
61  return "Certificate chain does not end in a CA certificate";
63  return "Certificate issuer does not match subject of issuing cert";
64 
66  return "Certificate policy error";
68  return "Certificate contains duplicate policy";
70  return "Certificate does not allow the requested usage";
72  return "Certificate chain too long";
74  return "CA certificate not allowed to issue certs";
76  return "CA certificate not allowed to issue CRLs";
78  return "No CRL with matching distribution point for certificate";
80  return "OCSP cert not listed";
82  return "OCSP bad status";
84  return "Certificate does not match provided name";
86  return "Certificate does not pass name constraint";
88  return "Unknown critical extension encountered";
90  return "Duplicate certificate extension encountered";
92  return "Encountered extension in certificate with version < 3";
94  return "OCSP signature error";
96  return "Unable to find certificate issusing OCSP response";
98  return "OCSP issuer's keyusage prohibits OCSP";
100  return "OCSP parsing valid";
102  return "OCSP requests not available, no HTTP support compiled in";
104  return "Certificate is revoked";
106  return "CRL bad signature";
108  return "Signature error";
110  return "Certificate public key invalid";
112  return "Certificate signed with unknown/unavailable algorithm";
114  return "Certificate signature has invalid parameters";
115 
116  // intentionally no default so we are warned if new enum values are added
117  }
118 
119  return nullptr;
120  }
121 
122 }
Definition: alg_id.cpp:13
std::string to_string(const secure_vector< uint8_t > &bytes)
Definition: stl_util.h:25
Certificate_Status_Code
Definition: cert_status.h:18