aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-24 22:40:46 +0000
committerlloyd <[email protected]>2008-04-24 22:40:46 +0000
commitb990aa276af6936a1c3d7c01d5b35d52ea7b3baa (patch)
tree177abbfcc995e1607fd423113e8441611fa161ed
parent42078262c5a5a4203a3256d6b0ab16792c48a433 (diff)
Move ASN1_Tag from enums.h to asn1_int.h. The enums.h header is a total
grab back of stuff, most of which are not used outside of very specific contexts, and some only internally. I am thinking to remove it and put each individual enum in an appropriate header.
-rw-r--r--include/asn1_int.h38
-rw-r--r--include/enums.h37
2 files changed, 37 insertions, 38 deletions
diff --git a/include/asn1_int.h b/include/asn1_int.h
index e6c3819c6..3e0562b9c 100644
--- a/include/asn1_int.h
+++ b/include/asn1_int.h
@@ -7,12 +7,48 @@
#define BOTAN_ASN1_H__
#include <botan/secmem.h>
-#include <botan/enums.h>
#include <botan/exceptn.h>
namespace Botan {
/*************************************************
+* ASN.1 Type and Class Tags *
+*************************************************/
+enum ASN1_Tag {
+ UNIVERSAL = 0x00,
+ APPLICATION = 0x40,
+ CONTEXT_SPECIFIC = 0x80,
+ PRIVATE = 0xC0,
+
+ CONSTRUCTED = 0x20,
+
+ EOC = 0x00,
+ BOOLEAN = 0x01,
+ INTEGER = 0x02,
+ BIT_STRING = 0x03,
+ OCTET_STRING = 0x04,
+ NULL_TAG = 0x05,
+ OBJECT_ID = 0x06,
+ ENUMERATED = 0x0A,
+ SEQUENCE = 0x10,
+ SET = 0x11,
+
+ UTF8_STRING = 0x0C,
+ NUMERIC_STRING = 0x12,
+ PRINTABLE_STRING = 0x13,
+ T61_STRING = 0x14,
+ IA5_STRING = 0x16,
+ VISIBLE_STRING = 0x1A,
+ BMP_STRING = 0x1E,
+
+ UTC_TIME = 0x17,
+ GENERALIZED_TIME = 0x18,
+
+ NO_OBJECT = 0xFF00,
+ DIRECTORY_STRING = 0xFF01
+};
+
+/*************************************************
* Basic ASN.1 Object Interface *
*************************************************/
class BOTAN_DLL ASN1_Object
diff --git a/include/enums.h b/include/enums.h
index cd11749e5..d12b5a1e3 100644
--- a/include/enums.h
+++ b/include/enums.h
@@ -9,43 +9,6 @@
namespace Botan {
/*************************************************
-* ASN.1 Type and Class Tags *
-*************************************************/
-enum ASN1_Tag {
- UNIVERSAL = 0x00,
- APPLICATION = 0x40,
- CONTEXT_SPECIFIC = 0x80,
- PRIVATE = 0xC0,
-
- CONSTRUCTED = 0x20,
-
- EOC = 0x00,
- BOOLEAN = 0x01,
- INTEGER = 0x02,
- BIT_STRING = 0x03,
- OCTET_STRING = 0x04,
- NULL_TAG = 0x05,
- OBJECT_ID = 0x06,
- ENUMERATED = 0x0A,
- SEQUENCE = 0x10,
- SET = 0x11,
-
- UTF8_STRING = 0x0C,
- NUMERIC_STRING = 0x12,
- PRINTABLE_STRING = 0x13,
- T61_STRING = 0x14,
- IA5_STRING = 0x16,
- VISIBLE_STRING = 0x1A,
- BMP_STRING = 0x1E,
-
- UTC_TIME = 0x17,
- GENERALIZED_TIME = 0x18,
-
- NO_OBJECT = 0xFF00,
- DIRECTORY_STRING = 0xFF01
-};
-
-/*************************************************
* X.509v3 Key Constraints *
*************************************************/
enum Key_Constraints {