1 /*
2 * Enumerations
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Distributed under the terms of the Botan license
6 */
7 
8 #ifndef BOTAN_ENUMS_H__
9 #define BOTAN_ENUMS_H__
10 
11 #include <botan/ber_dec.h>
12 
13 namespace Botan {
14 
15 /**
16 * X.509v3 Key Constraints.
17 */
18 enum Key_Constraints {
19    NO_CONSTRAINTS     = 0,
20    DIGITAL_SIGNATURE  = 32768,
21    NON_REPUDIATION    = 16384,
22    KEY_ENCIPHERMENT   = 8192,
23    DATA_ENCIPHERMENT  = 4096,
24    KEY_AGREEMENT      = 2048,
25    KEY_CERT_SIGN      = 1024,
26    CRL_SIGN           = 512,
27    ENCIPHER_ONLY      = 256,
28    DECIPHER_ONLY      = 128
29 };
30 
31 /**
32 * BER Decoding Function for key constraints
33 */
34 namespace BER {
35 
36 void BOTAN_DLL decode(BER_Decoder&, Key_Constraints&);
37 
38 }
39 
40 /**
41 * X.509v2 CRL Reason Code.
42 */
43 enum CRL_Code {
44    UNSPECIFIED            = 0,
45    KEY_COMPROMISE         = 1,
46    CA_COMPROMISE          = 2,
47    AFFILIATION_CHANGED    = 3,
48    SUPERSEDED             = 4,
49    CESSATION_OF_OPERATION = 5,
50    CERTIFICATE_HOLD       = 6,
51    REMOVE_FROM_CRL        = 8,
52    PRIVLEDGE_WITHDRAWN    = 9,
53    AA_COMPROMISE          = 10,
54 
55    DELETE_CRL_ENTRY       = 0xFF00,
56    OCSP_GOOD              = 0xFF01,
57    OCSP_UNKNOWN           = 0xFF02
58 };
59 
60 /*
61 * Various Other Enumerations
62 */
63 
64 /**
65 * The two types of X509 encoding supported by Botan.
66 */
67 enum X509_Encoding { RAW_BER, PEM };
68 
69 }
70 
71 #endif
72