Botan  2.4.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";
29 
31  return "No revocation data";
33  return "Signature method too weak";
35  return "Hash function used is considered too weak for security";
36 
38  return "Certificate is not yet valid";
40  return "Certificate has expired";
42  return "OCSP is not yet valid";
44  return "OCSP response has expired";
46  return "CRL response is not yet valid";
48  return "CRL has expired";
49 
51  return "Certificate issuer not found";
53  return "Cannot establish trust";
55  return "Loop in certificate chain";
57  return "Certificate chain does not end in a CA certificate";
59  return "Certificate issuer does not match subject of issuing cert";
60 
62  return "Certificate policy error";
64  return "Certificate contains duplicate policy";
66  return "Certificate does not allow the requested usage";
68  return "Certificate chain too long";
70  return "CA certificate not allowed to issue certs";
72  return "CA certificate not allowed to issue CRLs";
74  return "No CRL with matching distribution point for certificate";
76  return "OCSP cert not listed";
78  return "OCSP bad status";
80  return "Certificate does not match provided name";
82  return "Certificate does not pass name constraint";
84  return "Unknown critical extension encountered";
86  return "Duplicate certificate extension encountered";
88  return "Encountered extension in certificate with version < 3";
90  return "OCSP signature error";
92  return "Unable to find certificate issusing OCSP response";
94  return "OCSP issuer's keyusage prohibits OCSP";
96  return "OCSP parsing valid";
98  return "OCSP requests not available, no HTTP support compiled in";
100  return "Certificate is revoked";
102  return "CRL bad signature";
104  return "Signature error";
106  return "Certificate public key invalid";
108  return "Certificate signed with unknown/unavailable algorithm";
110  return "Certificate signature has invalid parameters";
111 
112  // intentionally no default so we are warned if new enum values are added
113  }
114 
115  return nullptr;
116  }
117 
118 }
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