Botan  2.1.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 "No revocation data";
28  return "Signature method too weak";
30  return "Hash function used is considered too weak for security";
31 
33  return "Certificate is not yet valid";
35  return "Certificate has expired";
37  return "OCSP is not yet valid";
39  return "OCSP response has expired";
41  return "CRL response is not yet valid";
43  return "CRL has expired";
44 
46  return "Certificate issuer not found";
48  return "Cannot establish trust";
50  return "Loop in certificate chain";
52  return "Certificate chain does not end in a CA certificate";
54  return "Certificate issuer does not match subject of issuing cert";
55 
57  return "Certificate policy error";
59  return "Certificate does not allow the requested usage";
61  return "Certificate chain too long";
63  return "CA certificate not allowed to issue certs";
65  return "CA certificate not allowed to issue CRLs";
67  return "OCSP cert not listed";
69  return "OCSP bad status";
71  return "Certificate does not match provided name";
73  return "Certificate does not pass name constraint";
75  return "Unknown critical extension encountered";
77  return "OCSP signature error";
79  return "Unable to find certificate issusing OCSP response";
81  return "OCSP issuer's keyusage prohibits OCSP";
83  return "OCSP parsing valid";
85  return "OCSP requests not available, no HTTP support compiled in";
87  return "Certificate is revoked";
89  return "CRL bad signature";
91  return "Signature error";
93  return "Certificate public key invalid";
94  // intentionally no default so we are warned
95  }
96 
97  return nullptr;
98  }
99 
100 }
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