Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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 */
18 enum class Certificate_Status_Code {
19 OK = 0,
20 VERIFIED = 0,
21
22 // Revocation status
23 OCSP_RESPONSE_GOOD = 1,
24 OCSP_SIGNATURE_OK = 2,
25 VALID_CRL_CHECKED = 3,
26 OCSP_NO_HTTP = 4,
27
28 // Errors
29 FIRST_ERROR_STATUS = 1000,
30
31 SIGNATURE_METHOD_TOO_WEAK = 1000,
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,
45 CANNOT_ESTABLISH_TRUST = 3001,
46 CERT_CHAIN_LOOP = 3002,
47 CHAIN_LACKS_TRUST_ROOT = 3003,
48 CHAIN_NAME_MISMATCH = 3004,
49
50 // Validation errors
51 POLICY_ERROR = 4000,
52 INVALID_USAGE = 4001,
53 CERT_CHAIN_TOO_LONG = 4002,
54 CA_CERT_NOT_FOR_CERT_ISSUER = 4003,
55 NAME_CONSTRAINT_ERROR = 4004,
56
57 // Revocation errors
58 CA_CERT_NOT_FOR_CRL_ISSUER = 4005,
59 OCSP_CERT_NOT_LISTED = 4006,
60 OCSP_BAD_STATUS = 4007,
61
62 // Other problems
63 CERT_NAME_NOMATCH = 4008,
64 UNKNOWN_CRITICAL_EXTENSION = 4009,
65 OCSP_SIGNATURE_ERROR = 4501,
66 OCSP_ISSUER_NOT_FOUND = 4502,
67 OCSP_RESPONSE_MISSING_KEYUSAGE = 4503,
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
Botan::Certificate_Status_Code::NAME_CONSTRAINT_ERROR
Botan::Certificate_Status_Code::CERT_NAME_NOMATCH
Botan::Certificate_Status_Code::OCSP_SIGNATURE_ERROR
Botan::Certificate_Status_Code::OCSP_RESPONSE_MISSING_KEYUSAGE
Botan::Certificate_Status_Code::OCSP_CERT_NOT_LISTED
Botan::Certificate_Status_Code::POLICY_ERROR
Botan::Certificate_Status_Code::OK
Botan::Certificate_Status_Code::UNKNOWN_CRITICAL_EXTENSION
Botan::Certificate_Status_Code::CANNOT_ESTABLISH_TRUST
Botan::Certificate_Status_Code::CERT_PUBKEY_INVALID
Botan::Certificate_Status_Code::SIGNATURE_ERROR
Botan::Certificate_Status_Code::VALID_CRL_CHECKED
Botan::Certificate_Status_Code::CRL_BAD_SIGNATURE
Botan::Certificate_Status_Code::CRL_NOT_YET_VALID
Botan::Certificate_Status_Code::OCSP_RESPONSE_GOOD
Botan::Certificate_Status_Code::CA_CERT_NOT_FOR_CRL_ISSUER
Botan::Certificate_Status_Code::CHAIN_LACKS_TRUST_ROOT
Botan::Certificate_Status_Code::CHAIN_NAME_MISMATCH
Botan::Certificate_Status_Code::OCSP_BAD_STATUS
Botan::Certificate_Status_Code::CERT_CHAIN_TOO_LONG
Botan::Certificate_Status_Code::OCSP_NOT_YET_VALID
Botan::Certificate_Status_Code::CERT_HAS_EXPIRED
Botan::Certificate_Status_Code::SIGNATURE_METHOD_TOO_WEAK
Botan::Certificate_Status_Code::UNTRUSTED_HASH
Botan::Certificate_Status_Code::CERT_ISSUER_NOT_FOUND
Botan::Certificate_Status_Code::CERT_CHAIN_LOOP
Botan::Certificate_Status_Code::FIRST_ERROR_STATUS
Botan
Definition: alg_id.cpp:13
Botan::Certificate_Status_Code::CRL_HAS_EXPIRED
Botan::to_string
std::string to_string(const secure_vector< uint8_t > &bytes)
Definition: stl_util.h:25
Botan::Certificate_Status_Code::CERT_NOT_YET_VALID
Botan::Certificate_Status_Code::OCSP_HAS_EXPIRED
Botan::Certificate_Status_Code::OCSP_SIGNATURE_OK
Botan::Certificate_Status_Code
Certificate_Status_Code
Definition: cert_status.h:18
Botan::Certificate_Status_Code::OCSP_RESPONSE_INVALID
Botan::Certificate_Status_Code::VERIFIED
Botan::Certificate_Status_Code::OCSP_ISSUER_NOT_FOUND
Botan::Certificate_Status_Code::CERT_IS_REVOKED
Botan::Certificate_Status_Code::OCSP_NO_HTTP
Botan::Certificate_Status_Code::NO_REVOCATION_DATA
Botan::Certificate_Status_Code::INVALID_USAGE
Botan::Certificate_Status_Code::CA_CERT_NOT_FOR_CERT_ISSUER