diff options
author | lloyd <[email protected]> | 2009-07-15 15:12:20 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-07-15 15:12:20 +0000 |
commit | 6fd01228840942ad122d1adabb3f7971a4e3b244 (patch) | |
tree | 57df224bd849d325e9747a374c85784abdd0e76c /src/pubkey/pubkey_enums.h | |
parent | 11470400cd77cbd20f60247f0a07fcac45772646 (diff) |
Move the contents of pubkey/pubkey (which was kind of a catch-all to
just toplevel pubkey). This was a convention I realized made sense sometime
on when I was first doing the modularization changes.
Move pkcs8.* and x509_key.* to pk_codecs
Diffstat (limited to 'src/pubkey/pubkey_enums.h')
-rw-r--r-- | src/pubkey/pubkey_enums.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/pubkey/pubkey_enums.h b/src/pubkey/pubkey_enums.h new file mode 100644 index 000000000..53e319f38 --- /dev/null +++ b/src/pubkey/pubkey_enums.h @@ -0,0 +1,77 @@ +/* +* Enumerations +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_ENUMS_H__ +#define BOTAN_ENUMS_H__ + +#include <botan/ber_dec.h> + +namespace Botan { + +/** +* X.509v3 Key Constraints. +*/ +enum Key_Constraints { + NO_CONSTRAINTS = 0, + DIGITAL_SIGNATURE = 32768, + NON_REPUDIATION = 16384, + KEY_ENCIPHERMENT = 8192, + DATA_ENCIPHERMENT = 4096, + KEY_AGREEMENT = 2048, + KEY_CERT_SIGN = 1024, + CRL_SIGN = 512, + ENCIPHER_ONLY = 256, + DECIPHER_ONLY = 128 +}; + +/** +* BER Decoding Function for key constraints +*/ +namespace BER { + +void BOTAN_DLL decode(BER_Decoder&, Key_Constraints&); + +} + +/** +* X.509v2 CRL Reason Code. +*/ +enum CRL_Code { + UNSPECIFIED = 0, + KEY_COMPROMISE = 1, + CA_COMPROMISE = 2, + AFFILIATION_CHANGED = 3, + SUPERSEDED = 4, + CESSATION_OF_OPERATION = 5, + CERTIFICATE_HOLD = 6, + REMOVE_FROM_CRL = 8, + PRIVLEDGE_WITHDRAWN = 9, + AA_COMPROMISE = 10, + + DELETE_CRL_ENTRY = 0xFF00, + OCSP_GOOD = 0xFF01, + OCSP_UNKNOWN = 0xFF02 +}; + +/* +* Various Other Enumerations +*/ + +/** +* The two types of X509 encoding supported by Botan. +*/ +enum X509_Encoding { RAW_BER, PEM }; + +/** +* Value to encode in case of no path limit in the X509 +* BasicConstraints extension. +*/ +static const u32bit NO_CERT_PATH_LIMIT = 0xFFFFFFF0; + +} + +#endif |