From a2c99d3270eb73ef2db5704fc54356c6b75096f8 Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 18 May 2006 18:33:19 +0000 Subject: Initial checkin --- include/asn1_int.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 include/asn1_int.h (limited to 'include/asn1_int.h') 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 +#include + +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 put_in_sequence(const MemoryRegion&); +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 -- cgit v1.2.3