Botan 3.1.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 "OCSP issuer is not trustworthy";
32
34 return "No revocation data";
36 return "Signature method too weak";
38 return "Hash function used is considered too weak for security";
39
41 return "Certificate is not yet valid";
43 return "Certificate has expired";
45 return "OCSP is not yet valid";
47 return "OCSP response has expired";
49 return "OCSP response is too old";
51 return "CRL response is not yet valid";
53 return "CRL has expired";
54
56 return "Certificate issuer not found";
58 return "Cannot establish trust";
60 return "Loop in certificate chain";
62 return "Certificate chain does not end in a CA certificate";
64 return "Certificate issuer does not match subject of issuing cert";
65
67 return "Certificate policy error";
69 return "Certificate contains duplicate policy";
71 return "Certificate does not allow the requested usage";
73 return "Certificate chain too long";
75 return "CA certificate not allowed to issue certs";
77 return "CA certificate not allowed to issue CRLs";
79 return "No CRL with matching distribution point for certificate";
81 return "OCSP cert not listed";
83 return "OCSP bad status";
85 return "Certificate does not match provided name";
87 return "Certificate does not pass name constraint";
89 return "Unknown critical extension encountered";
91 return "Duplicate certificate extension encountered";
93 return "Encountered extension in certificate with version that does not allow it";
95 return "Encountered v2 identifiers in v1 certificate";
97 return "OCSP signature error";
99 return "Unable to find certificate issusing OCSP response";
101 return "OCSP issuer's keyusage prohibits OCSP";
103 return "OCSP parsing valid";
105 return "OCSP requests not available, no HTTP support compiled in";
107 return "Certificate is revoked";
109 return "CRL bad signature";
111 return "Signature error";
113 return "Certificate public key invalid";
115 return "Certificate signed with unknown/unavailable algorithm";
117 return "Certificate signature has invalid parameters";
118
119 // intentionally no default so we are warned if new enum values are added
120 }
121
122 return nullptr;
123}
124
125} // namespace Botan
Definition: alg_id.cpp:13
std::string to_string(ErrorType type)
Convert an ErrorType to string.
Definition: exceptn.cpp:13
Certificate_Status_Code
Definition: pkix_enums.h:20