Botan  2.1.0
Crypto and TLS for C++11
cert_status.h
Go to the documentation of this file.
1 /*
2 * Path validation result enums
3 * (C) 2013 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7 
8 #ifndef BOTAN_X509_PATH_RESULT_H__
9 #define BOTAN_X509_PATH_RESULT_H__
10 
11 #include <botan/build.h>
12 
13 namespace Botan {
14 
15 /**
16 * Certificate validation status code
17 */
19  OK = 0,
20  VERIFIED = 0,
21 
22  // Revocation status
26  OCSP_NO_HTTP = 4,
27 
28  // Errors
29  FIRST_ERROR_STATUS = 1000,
30 
32  UNTRUSTED_HASH = 1001,
33  NO_REVOCATION_DATA = 1002,
34 
35  // Time problems
36  CERT_NOT_YET_VALID = 2000,
37  CERT_HAS_EXPIRED = 2001,
38  OCSP_NOT_YET_VALID = 2002,
39  OCSP_HAS_EXPIRED = 2003,
40  CRL_NOT_YET_VALID = 2004,
41  CRL_HAS_EXPIRED = 2005,
42 
43  // Chain generation problems
44  CERT_ISSUER_NOT_FOUND = 3000,
46  CERT_CHAIN_LOOP = 3002,
48  CHAIN_NAME_MISMATCH = 3004,
49 
50  // Validation errors
51  POLICY_ERROR = 4000,
52  INVALID_USAGE = 4001,
53  CERT_CHAIN_TOO_LONG = 4002,
55  NAME_CONSTRAINT_ERROR = 4004,
56 
57  // Revocation errors
59  OCSP_CERT_NOT_LISTED = 4006,
60  OCSP_BAD_STATUS = 4007,
61 
62  // Other problems
63  CERT_NAME_NOMATCH = 4008,
65  OCSP_SIGNATURE_ERROR = 4501,
66  OCSP_ISSUER_NOT_FOUND = 4502,
68  OCSP_RESPONSE_INVALID = 4504,
69 
70  // Hard failures
71  CERT_IS_REVOKED = 5000,
72  CRL_BAD_SIGNATURE = 5001,
73  SIGNATURE_ERROR = 5002,
74  CERT_PUBKEY_INVALID = 5003,
75 };
76 
77 /**
78 * Convert a status code to a human readable diagnostic message
79 * @param code the certifcate status
80 * @return string literal constant, or nullptr if code unknown
81 */
82 BOTAN_DLL const char* to_string(Certificate_Status_Code code);
83 
84 }
85 
86 #endif
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