aboutsummaryrefslogtreecommitdiffstats
path: root/src/asn1/ber_dec.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-05-18 20:32:36 +0000
committerlloyd <[email protected]>2012-05-18 20:32:36 +0000
commitc691561f3198f481c13457433efbccc1c9fcd898 (patch)
treea45ea2c5a30e0cb009fbcb68a61ef39332ff790c /src/asn1/ber_dec.h
parentd76700f01c7ecac5633edf75f8d7408b46c5dbac (diff)
Fairly huge update that replaces the old secmem types with std::vector
using a custom allocator. Currently our allocator just does new/delete with a memset before deletion, and the mmap and mlock allocators have been removed.
Diffstat (limited to 'src/asn1/ber_dec.h')
-rw-r--r--src/asn1/ber_dec.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/asn1/ber_dec.h b/src/asn1/ber_dec.h
index 87039ed93..6b010fcc4 100644
--- a/src/asn1/ber_dec.h
+++ b/src/asn1/ber_dec.h
@@ -29,13 +29,15 @@ class BOTAN_DLL BER_Decoder
BER_Decoder start_cons(ASN1_Tag type_tag, ASN1_Tag class_tag = UNIVERSAL);
BER_Decoder& end_cons();
- BER_Decoder& raw_bytes(MemoryRegion<byte>& v);
+ BER_Decoder& raw_bytes(secure_vector<byte>& v);
+ BER_Decoder& raw_bytes(std::vector<byte>& v);
BER_Decoder& decode_null();
BER_Decoder& decode(bool& v);
BER_Decoder& decode(size_t& v);
BER_Decoder& decode(class BigInt& v);
- BER_Decoder& decode(MemoryRegion<byte>& v, ASN1_Tag type_tag);
+ BER_Decoder& decode(std::vector<byte>& v, ASN1_Tag type_tag);
+ BER_Decoder& decode(secure_vector<byte>& v, ASN1_Tag type_tag);
BER_Decoder& decode(bool& v,
ASN1_Tag type_tag,
@@ -49,7 +51,12 @@ class BOTAN_DLL BER_Decoder
ASN1_Tag type_tag,
ASN1_Tag class_tag = CONTEXT_SPECIFIC);
- BER_Decoder& decode(MemoryRegion<byte>& v,
+ BER_Decoder& decode(std::vector<byte>& v,
+ ASN1_Tag real_type,
+ ASN1_Tag type_tag,
+ ASN1_Tag class_tag = CONTEXT_SPECIFIC);
+
+ BER_Decoder& decode(secure_vector<byte>& v,
ASN1_Tag real_type,
ASN1_Tag type_tag,
ASN1_Tag class_tag = CONTEXT_SPECIFIC);
@@ -99,15 +106,24 @@ class BOTAN_DLL BER_Decoder
return (*this);
}
- BER_Decoder& decode_optional_string(MemoryRegion<byte>& out,
+ BER_Decoder& decode_optional_string(std::vector<byte>& out,
+ ASN1_Tag real_type,
+ u16bit type_no);
+
+ BER_Decoder& decode_optional_string(secure_vector<byte>& out,
ASN1_Tag real_type,
u16bit type_no);
BER_Decoder& operator=(const BER_Decoder&) = delete;
BER_Decoder(DataSource&);
+
BER_Decoder(const byte[], size_t);
- BER_Decoder(const MemoryRegion<byte>&);
+
+ BER_Decoder(const secure_vector<byte>&);
+
+ BER_Decoder(const std::vector<byte>& vec);
+
BER_Decoder(const BER_Decoder&);
~BER_Decoder();
private: