monotone

monotone Mtn Source Tree

Root/botan/enums.h

1/*************************************************
2* Enumerations Header File *
3* (C) 1999-2005 The Botan Project *
4*************************************************/
5
6#ifndef BOTAN_ENUMS_H__
7#define BOTAN_ENUMS_H__
8
9namespace Botan {
10
11/*************************************************
12* ASN.1 Type and Class Tags *
13*************************************************/
14enum ASN1_Tag {
15 EOC = 0x00,
16 BOOLEAN = 0x01,
17 INTEGER = 0x02,
18 BIT_STRING = 0x03,
19 OCTET_STRING = 0x04,
20 NULL_TAG = 0x05,
21 OBJECT_ID = 0x06,
22 ENUMERATED = 0x0A,
23 SEQUENCE = 0x10,
24 SET = 0x11,
25
26 UTF8_STRING = 0x0C,
27 NUMERIC_STRING = 0x12,
28 PRINTABLE_STRING = 0x13,
29 T61_STRING = 0x14,
30 IA5_STRING = 0x16,
31 VISIBLE_STRING = 0x1A,
32 BMP_STRING = 0x1E,
33
34 UTC_TIME = 0x17,
35 GENERALIZED_TIME = 0x18,
36
37 CONSTRUCTED = 0x20,
38
39 UNIVERSAL = 0x00,
40 APPLICATION = 0x40,
41 CONTEXT_SPECIFIC = 0x80,
42 PRIVATE = 0xC0,
43
44 NO_OBJECT = 0xFF00,
45 DIRECTORY_STRING = 0xFF01
46};
47
48/*************************************************
49* X.509v3 Key Constraints *
50*************************************************/
51enum Key_Constraints {
52 NO_CONSTRAINTS = 0,
53 DIGITAL_SIGNATURE = 32768,
54 NON_REPUDIATION = 16384,
55 KEY_ENCIPHERMENT = 8192,
56 DATA_ENCIPHERMENT = 4096,
57 KEY_AGREEMENT = 2048,
58 KEY_CERT_SIGN = 1024,
59 CRL_SIGN = 512,
60 ENCIPHER_ONLY = 256,
61 DECIPHER_ONLY = 128
62};
63
64/*************************************************
65* X.509v2 CRL Reason Code *
66*************************************************/
67enum CRL_Code {
68 UNSPECIFIED = 0,
69 KEY_COMPROMISE = 1,
70 CA_COMPROMISE = 2,
71 AFFILIATION_CHANGED = 3,
72 SUPERSEDED = 4,
73 CESSATION_OF_OPERATION = 5,
74 CERTIFICATE_HOLD = 6,
75 REMOVE_FROM_CRL = 8,
76 PRIVLEDGE_WITHDRAWN = 9,
77 AA_COMPROMISE = 10,
78
79 DELETE_CRL_ENTRY = 0xFF00,
80 OCSP_GOOD = 0xFF01,
81 OCSP_UNKNOWN = 0xFF02
82};
83
84/*************************************************
85* X.509 Certificate Validation Result *
86*************************************************/
87enum X509_Code {
88 VERIFIED,
89 UNKNOWN_X509_ERROR,
90 CANNOT_ESTABLISH_TRUST,
91 CERT_CHAIN_TOO_LONG,
92 SIGNATURE_ERROR,
93 POLICY_ERROR,
94 INVALID_USAGE,
95
96 CERT_FORMAT_ERROR,
97 CERT_ISSUER_NOT_FOUND,
98 CERT_NOT_YET_VALID,
99 CERT_HAS_EXPIRED,
100 CERT_IS_REVOKED,
101
102 CRL_FORMAT_ERROR,
103 CRL_ISSUER_NOT_FOUND,
104 CRL_NOT_YET_VALID,
105 CRL_HAS_EXPIRED,
106
107 CA_CERT_CANNOT_SIGN,
108 CA_CERT_NOT_FOR_CERT_ISSUER,
109 CA_CERT_NOT_FOR_CRL_ISSUER
110};
111
112/*************************************************
113* Various Other Enumerations *
114*************************************************/
115enum RNG_Quality { Nonce = 0, PublicValue = 0, SessionKey, LongTermKey };
116
117enum Decoder_Checking { NONE, IGNORE_WS, FULL_CHECK };
118
119enum X509_Encoding { RAW_BER, PEM };
120
121enum Cipher_Dir { ENCRYPTION, DECRYPTION };
122
123enum Signature_Format { IEEE_1363, DER_SEQUENCE };
124
125}
126
127#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status