Botan 2.19.1
Crypto and TLS for C&
pkix_enums.h
Go to the documentation of this file.
1/*
2* (C) 2013 Jack Lloyd
3*
4* Botan is released under the Simplified BSD License (see license.txt)
5*/
6
7#ifndef BOTAN_X509_PKIX_ENUMS_H_
8#define BOTAN_X509_PKIX_ENUMS_H_
9
10#include <botan/types.h>
11
12namespace Botan {
13
14/**
15* Certificate validation status code
16*/
18 OK = 0,
19 VERIFIED = 0,
20
21 // Revocation status
25 OCSP_NO_HTTP = 4,
26
27 // Warnings
30 DN_TOO_LONG = 501,
33
34 // Typo versions of above - will be removed in future major release
37
38 // Errors
39 FIRST_ERROR_STATUS = 1000,
40
42 UNTRUSTED_HASH = 1001,
43 NO_REVOCATION_DATA = 1002,
44 NO_MATCHING_CRLDP = 1003,
45
46 // Time problems
47 CERT_NOT_YET_VALID = 2000,
48 CERT_HAS_EXPIRED = 2001,
49 OCSP_NOT_YET_VALID = 2002,
50 OCSP_HAS_EXPIRED = 2003,
51 CRL_NOT_YET_VALID = 2004,
52 CRL_HAS_EXPIRED = 2005,
53 OCSP_IS_TOO_OLD = 2006,
54
55 // Chain generation problems
58 CERT_CHAIN_LOOP = 3002,
61
62 // Validation errors
63 POLICY_ERROR = 4000,
64 INVALID_USAGE = 4001,
68
69 // Revocation errors
72 OCSP_BAD_STATUS = 4007,
73
74 // Other problems
75 CERT_NAME_NOMATCH = 4008,
82 EXT_IN_V1_V2_CERT = 4505,
85
86 // Hard failures
87 CERT_IS_REVOKED = 5000,
88 CRL_BAD_SIGNATURE = 5001,
89 SIGNATURE_ERROR = 5002,
93};
94
95/**
96* Convert a status code to a human readable diagnostic message
97* @param code the certifcate status
98* @return string literal constant, or nullptr if code unknown
99*/
101
102/**
103* X.509v3 Key Constraints.
104* If updating update copy in ffi.h
105*/
112 KEY_AGREEMENT = 1 << 11,
113 KEY_CERT_SIGN = 1 << 10,
114 CRL_SIGN = 1 << 9,
116 DECIPHER_ONLY = 1 << 7
118
119/**
120* X.509v2 CRL Reason Code.
121* This will become an enum class in a future major release
122*/
123enum CRL_Code : uint32_t {
135
137 OCSP_GOOD = 0xFF01,
138 OCSP_UNKNOWN = 0xFF02
140
141}
142
143#endif
#define BOTAN_PUBLIC_API(maj, min)
Definition: compiler.h:31
Definition: alg_id.cpp:13
@ OCSP_GOOD
Definition: pkix_enums.h:137
@ PRIVLEDGE_WITHDRAWN
Definition: pkix_enums.h:132
@ OCSP_UNKNOWN
Definition: pkix_enums.h:138
@ AFFILIATION_CHANGED
Definition: pkix_enums.h:127
@ KEY_COMPROMISE
Definition: pkix_enums.h:125
@ UNSPECIFIED
Definition: pkix_enums.h:124
@ SUPERSEDED
Definition: pkix_enums.h:128
@ AA_COMPROMISE
Definition: pkix_enums.h:134
@ CA_COMPROMISE
Definition: pkix_enums.h:126
@ CESSATION_OF_OPERATION
Definition: pkix_enums.h:129
@ REMOVE_FROM_CRL
Definition: pkix_enums.h:131
@ CERTIFICATE_HOLD
Definition: pkix_enums.h:130
@ PRIVILEGE_WITHDRAWN
Definition: pkix_enums.h:133
@ DELETE_CRL_ENTRY
Definition: pkix_enums.h:136
std::string to_string(ErrorType type)
Convert an ErrorType to string.
Definition: exceptn.cpp:11
Certificate_Status_Code
Definition: pkix_enums.h:17
Key_Constraints
Definition: pkix_enums.h:106
@ DATA_ENCIPHERMENT
Definition: pkix_enums.h:111
@ CRL_SIGN
Definition: pkix_enums.h:114
@ KEY_CERT_SIGN
Definition: pkix_enums.h:113
@ NO_CONSTRAINTS
Definition: pkix_enums.h:107
@ ENCIPHER_ONLY
Definition: pkix_enums.h:115
@ DIGITAL_SIGNATURE
Definition: pkix_enums.h:108
@ KEY_AGREEMENT
Definition: pkix_enums.h:112
@ DECIPHER_ONLY
Definition: pkix_enums.h:116
@ KEY_ENCIPHERMENT
Definition: pkix_enums.h:110
@ NON_REPUDIATION
Definition: pkix_enums.h:109