Botan  2.8.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 * Warning: reflect any changes to this in botan_cert_status_code in ffi.h
18 */
20  OK = 0,
21  VERIFIED = 0,
22 
23  // Revocation status
27  OCSP_NO_HTTP = 4,
28 
29  // Warnings
32  DN_TOO_LONG = 501,
35 
36  // Errors
37  FIRST_ERROR_STATUS = 1000,
38 
40  UNTRUSTED_HASH = 1001,
41  NO_REVOCATION_DATA = 1002,
42  NO_MATCHING_CRLDP = 1003,
43 
44  // Time problems
45  CERT_NOT_YET_VALID = 2000,
46  CERT_HAS_EXPIRED = 2001,
47  OCSP_NOT_YET_VALID = 2002,
48  OCSP_HAS_EXPIRED = 2003,
49  CRL_NOT_YET_VALID = 2004,
50  CRL_HAS_EXPIRED = 2005,
51 
52  // Chain generation problems
53  CERT_ISSUER_NOT_FOUND = 3000,
55  CERT_CHAIN_LOOP = 3002,
57  CHAIN_NAME_MISMATCH = 3004,
58 
59  // Validation errors
60  POLICY_ERROR = 4000,
61  INVALID_USAGE = 4001,
62  CERT_CHAIN_TOO_LONG = 4002,
64  NAME_CONSTRAINT_ERROR = 4004,
65 
66  // Revocation errors
68  OCSP_CERT_NOT_LISTED = 4006,
69  OCSP_BAD_STATUS = 4007,
70 
71  // Other problems
72  CERT_NAME_NOMATCH = 4008,
75  OCSP_SIGNATURE_ERROR = 4501,
76  OCSP_ISSUER_NOT_FOUND = 4502,
78  OCSP_RESPONSE_INVALID = 4504,
79  EXT_IN_V1_V2_CERT = 4505,
80  DUPLICATE_CERT_POLICY = 4506,
81 
82  // Hard failures
83  CERT_IS_REVOKED = 5000,
84  CRL_BAD_SIGNATURE = 5001,
85  SIGNATURE_ERROR = 5002,
86  CERT_PUBKEY_INVALID = 5003,
89 };
90 
91 /**
92 * Convert a status code to a human readable diagnostic message
93 * @param code the certifcate status
94 * @return string literal constant, or nullptr if code unknown
95 */
97 
98 }
99 
100 #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:19