Botan 3.6.1
Crypto and TLS for C&
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/pkix_enums.h>
8
9namespace Botan {
10
12 switch(code) {
14 return "Verified";
16 return "OCSP response accepted as affirming unrevoked status for certificate";
18 return "Signature on OCSP response was found valid";
20 return "Valid CRL examined";
21
23 return "Certificate serial number is negative";
25 return "Distinguished name too long";
27 return "OCSP URL not available";
29 return "OCSP server not available";
31 return "Trusted certificate is not yet valid";
33 return "Trusted certificate has expired";
35 return "OCSP issuer is not trustworthy";
36
38 return "No revocation data";
40 return "Signature method too weak";
42 return "Hash function used is considered too weak for security";
43
45 return "Certificate is not yet valid";
47 return "Certificate has expired";
49 return "OCSP is not yet valid";
51 return "OCSP response has expired";
53 return "OCSP response is too old";
55 return "CRL response is not yet valid";
57 return "CRL has expired";
58
60 return "Certificate issuer not found";
62 return "Cannot establish trust";
64 return "Loop in certificate chain";
66 return "Certificate chain does not end in a CA certificate";
68 return "Certificate issuer does not match subject of issuing cert";
69
71 return "Certificate policy error";
73 return "Certificate contains duplicate policy";
75 return "Certificate does not allow the requested usage";
77 return "Certificate chain too long";
79 return "CA certificate not allowed to issue certs";
81 return "CA certificate not allowed to issue CRLs";
83 return "No CRL with matching distribution point for certificate";
85 return "OCSP cert not listed";
87 return "OCSP bad status";
89 return "Certificate does not match provided name";
91 return "Certificate does not pass name constraint";
93 return "Unknown critical extension encountered";
95 return "Duplicate certificate extension encountered";
97 return "Encountered extension in certificate with version that does not allow it";
99 return "Encountered v2 identifiers in v1 certificate";
101 return "OCSP signature error";
103 return "Unable to find certificate issusing OCSP response";
105 return "OCSP issuer's keyusage prohibits OCSP";
107 return "OCSP parsing valid";
109 return "OCSP requests not available, no HTTP support compiled in";
111 return "Certificate is revoked";
113 return "CRL bad signature";
115 return "Signature error";
117 return "Certificate public key invalid";
119 return "Certificate signed with unknown/unavailable algorithm";
121 return "Certificate signature has invalid parameters";
122
123 // intentionally no default so we are warned if new enum values are added
124 }
125
126 return nullptr;
127}
128
129} // namespace Botan
std::string to_string(ErrorType type)
Convert an ErrorType to string.
Definition exceptn.cpp:13
Certificate_Status_Code
Definition pkix_enums.h:20