diff options
author | lloyd <[email protected]> | 2006-05-18 18:33:19 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-05-18 18:33:19 +0000 |
commit | a2c99d3270eb73ef2db5704fc54356c6b75096f8 (patch) | |
tree | ad3d6c4fcc8dd0f403f8105598943616246fe172 /include/asn1_int.h |
Initial checkin1.5.6
Diffstat (limited to 'include/asn1_int.h')
-rw-r--r-- | include/asn1_int.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/asn1_int.h b/include/asn1_int.h new file mode 100644 index 000000000..40ddbb444 --- /dev/null +++ b/include/asn1_int.h @@ -0,0 +1,55 @@ +/************************************************* +* ASN.1 Internals Header File * +* (C) 1999-2006 The Botan Project * +*************************************************/ + +#ifndef BOTAN_ASN1_H__ +#define BOTAN_ASN1_H__ + +#include <botan/bigint.h> +#include <botan/enums.h> + +namespace Botan { + +/************************************************* +* Basic ASN.1 Object Interface * +*************************************************/ +class ASN1_Object + { + public: + virtual void encode_into(class DER_Encoder&) const = 0; + virtual ~ASN1_Object() {} + }; + +/************************************************* +* ASN.1 Utility Functions * +*************************************************/ +class DataSource; + +namespace ASN1 { + +SecureVector<byte> put_in_sequence(const MemoryRegion<byte>&); +bool maybe_BER(DataSource&); + +} + +/************************************************* +* General BER Decoding Error Exception * +*************************************************/ +struct BER_Decoding_Error : public Decoding_Error + { + BER_Decoding_Error(const std::string&); + }; + +/************************************************* +* Exception For Incorrect BER Taggings * +*************************************************/ +struct BER_Bad_Tag : public BER_Decoding_Error + { + BER_Bad_Tag(const std::string&, ASN1_Tag); + BER_Bad_Tag(const std::string&, ASN1_Tag, ASN1_Tag); + }; + +} + +#endif |