Botan  2.7.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/types.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  // Warnings
31  DN_TOO_LONG = 501,
34 
35  // Errors
36  FIRST_ERROR_STATUS = 1000,
37 
39  UNTRUSTED_HASH = 1001,
40  NO_REVOCATION_DATA = 1002,
41  NO_MATCHING_CRLDP = 1003,
42 
43  // Time problems
44  CERT_NOT_YET_VALID = 2000,
45  CERT_HAS_EXPIRED = 2001,
46  OCSP_NOT_YET_VALID = 2002,
47  OCSP_HAS_EXPIRED = 2003,
48  CRL_NOT_YET_VALID = 2004,
49  CRL_HAS_EXPIRED = 2005,
50 
51  // Chain generation problems
52  CERT_ISSUER_NOT_FOUND = 3000,
54  CERT_CHAIN_LOOP = 3002,
56  CHAIN_NAME_MISMATCH = 3004,
57 
58  // Validation errors
59  POLICY_ERROR = 4000,
60  INVALID_USAGE = 4001,
61  CERT_CHAIN_TOO_LONG = 4002,
63  NAME_CONSTRAINT_ERROR = 4004,
64 
65  // Revocation errors
67  OCSP_CERT_NOT_LISTED = 4006,
68  OCSP_BAD_STATUS = 4007,
69 
70  // Other problems
71  CERT_NAME_NOMATCH = 4008,
74  OCSP_SIGNATURE_ERROR = 4501,
75  OCSP_ISSUER_NOT_FOUND = 4502,
77  OCSP_RESPONSE_INVALID = 4504,
78  EXT_IN_V1_V2_CERT = 4505,
79  DUPLICATE_CERT_POLICY = 4506,
80 
81  // Hard failures
82  CERT_IS_REVOKED = 5000,
83  CRL_BAD_SIGNATURE = 5001,
84  SIGNATURE_ERROR = 5002,
85  CERT_PUBKEY_INVALID = 5003,
88 };
89 
90 /**
91 * Convert a status code to a human readable diagnostic message
92 * @param code the certifcate status
93 * @return string literal constant, or nullptr if code unknown
94 */
96 
97 }
98 
99 #endif
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:27
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