Botan 2.13.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/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 */
19 enum class Certificate_Status_Code {
20 OK = 0,
21 VERIFIED = 0,
22
23 // Revocation status
24 OCSP_RESPONSE_GOOD = 1,
25 OCSP_SIGNATURE_OK = 2,
26 VALID_CRL_CHECKED = 3,
27 OCSP_NO_HTTP = 4,
28
29 // Warnings
30 FIRST_WARNING_STATUS = 500,
31 CERT_SERIAL_NEGATIVE = 500,
32 DN_TOO_LONG = 501,
33 OCSP_NO_REVOCATION_URL = 502,
34 OCSP_SERVER_NOT_AVAILABLE = 503,
35
36 // Typo versions of above - will be removed in future major release
37 OSCP_NO_REVOCATION_URL = 502,
38 OSCP_SERVER_NOT_AVAILABLE = 503,
39
40 // Errors
41 FIRST_ERROR_STATUS = 1000,
42
43 SIGNATURE_METHOD_TOO_WEAK = 1000,
44 UNTRUSTED_HASH = 1001,
45 NO_REVOCATION_DATA = 1002,
46 NO_MATCHING_CRLDP = 1003,
47
48 // Time problems
49 CERT_NOT_YET_VALID = 2000,
50 CERT_HAS_EXPIRED = 2001,
51 OCSP_NOT_YET_VALID = 2002,
52 OCSP_HAS_EXPIRED = 2003,
53 CRL_NOT_YET_VALID = 2004,
54 CRL_HAS_EXPIRED = 2005,
55 OCSP_IS_TOO_OLD = 2006,
56
57 // Chain generation problems
58 CERT_ISSUER_NOT_FOUND = 3000,
59 CANNOT_ESTABLISH_TRUST = 3001,
60 CERT_CHAIN_LOOP = 3002,
61 CHAIN_LACKS_TRUST_ROOT = 3003,
62 CHAIN_NAME_MISMATCH = 3004,
63
64 // Validation errors
65 POLICY_ERROR = 4000,
66 INVALID_USAGE = 4001,
67 CERT_CHAIN_TOO_LONG = 4002,
68 CA_CERT_NOT_FOR_CERT_ISSUER = 4003,
69 NAME_CONSTRAINT_ERROR = 4004,
70
71 // Revocation errors
72 CA_CERT_NOT_FOR_CRL_ISSUER = 4005,
73 OCSP_CERT_NOT_LISTED = 4006,
74 OCSP_BAD_STATUS = 4007,
75
76 // Other problems
77 CERT_NAME_NOMATCH = 4008,
78 UNKNOWN_CRITICAL_EXTENSION = 4009,
79 DUPLICATE_CERT_EXTENSION = 4010,
80 OCSP_SIGNATURE_ERROR = 4501,
81 OCSP_ISSUER_NOT_FOUND = 4502,
82 OCSP_RESPONSE_MISSING_KEYUSAGE = 4503,
83 OCSP_RESPONSE_INVALID = 4504,
84 EXT_IN_V1_V2_CERT = 4505,
85 DUPLICATE_CERT_POLICY = 4506,
86
87 // Hard failures
88 CERT_IS_REVOKED = 5000,
89 CRL_BAD_SIGNATURE = 5001,
90 SIGNATURE_ERROR = 5002,
91 CERT_PUBKEY_INVALID = 5003,
92 SIGNATURE_ALGO_UNKNOWN = 5004,
93 SIGNATURE_ALGO_BAD_PARAMS = 5005
94 };
95
96 /**
97 * Convert a status code to a human readable diagnostic message
98 * @param code the certifcate status
99 * @return string literal constant, or nullptr if code unknown
100 */
101 BOTAN_PUBLIC_API(2,0) const char* to_string(Certificate_Status_Code code);
102
103 }
104
105 #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::CERT_SERIAL_NEGATIVE
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::OSCP_SERVER_NOT_AVAILABLE
Botan::Certificate_Status_Code::FIRST_WARNING_STATUS
BOTAN_PUBLIC_API
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:31
Botan::Certificate_Status_Code::OCSP_SERVER_NOT_AVAILABLE
Botan::Certificate_Status_Code::DUPLICATE_CERT_EXTENSION
Botan::Certificate_Status_Code::OCSP_IS_TOO_OLD
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::to_string
std::string to_string(ErrorType type)
Convert an ErrorType to string.
Definition: exceptn.cpp:11
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::Certificate_Status_Code::SIGNATURE_ALGO_BAD_PARAMS
Botan::Certificate_Status_Code::CERT_NOT_YET_VALID
Botan::Certificate_Status_Code::DUPLICATE_CERT_POLICY
Botan::Certificate_Status_Code::OCSP_HAS_EXPIRED
Botan::Certificate_Status_Code::SIGNATURE_ALGO_UNKNOWN
Botan::Certificate_Status_Code::OCSP_SIGNATURE_OK
Botan::Certificate_Status_Code::OSCP_NO_REVOCATION_URL
Botan::Certificate_Status_Code::OCSP_NO_REVOCATION_URL
Botan::Certificate_Status_Code
Certificate_Status_Code
Definition: cert_status.h:19
Botan::Certificate_Status_Code::EXT_IN_V1_V2_CERT
Botan::Certificate_Status_Code::DN_TOO_LONG
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::NO_MATCHING_CRLDP
Botan::Certificate_Status_Code::CA_CERT_NOT_FOR_CERT_ISSUER