Botan  2.4.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,
32 
33  // Errors
34  FIRST_ERROR_STATUS = 1000,
35 
37  UNTRUSTED_HASH = 1001,
38  NO_REVOCATION_DATA = 1002,
39  NO_MATCHING_CRLDP = 1003,
40 
41  // Time problems
42  CERT_NOT_YET_VALID = 2000,
43  CERT_HAS_EXPIRED = 2001,
44  OCSP_NOT_YET_VALID = 2002,
45  OCSP_HAS_EXPIRED = 2003,
46  CRL_NOT_YET_VALID = 2004,
47  CRL_HAS_EXPIRED = 2005,
48 
49  // Chain generation problems
50  CERT_ISSUER_NOT_FOUND = 3000,
52  CERT_CHAIN_LOOP = 3002,
54  CHAIN_NAME_MISMATCH = 3004,
55 
56  // Validation errors
57  POLICY_ERROR = 4000,
58  INVALID_USAGE = 4001,
59  CERT_CHAIN_TOO_LONG = 4002,
61  NAME_CONSTRAINT_ERROR = 4004,
62 
63  // Revocation errors
65  OCSP_CERT_NOT_LISTED = 4006,
66  OCSP_BAD_STATUS = 4007,
67 
68  // Other problems
69  CERT_NAME_NOMATCH = 4008,
72  OCSP_SIGNATURE_ERROR = 4501,
73  OCSP_ISSUER_NOT_FOUND = 4502,
75  OCSP_RESPONSE_INVALID = 4504,
76  EXT_IN_V1_V2_CERT = 4505,
77  DUPLICATE_CERT_POLICY = 4506,
78 
79  // Hard failures
80  CERT_IS_REVOKED = 5000,
81  CRL_BAD_SIGNATURE = 5001,
82  SIGNATURE_ERROR = 5002,
83  CERT_PUBKEY_INVALID = 5003,
86 };
87 
88 /**
89 * Convert a status code to a human readable diagnostic message
90 * @param code the certifcate status
91 * @return string literal constant, or nullptr if code unknown
92 */
94 
95 }
96 
97 #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