aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/asn1
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-06-08 06:30:01 -0400
committerJack Lloyd <[email protected]>2018-06-08 06:30:01 -0400
commit1d474f74977ed7ba0609307316f11a708fd13159 (patch)
tree573605ebf513220d402cb6dce8b746eac0e7fa2b /src/lib/asn1
parent2559c80b098cec1bfcb30be1ca976f595aaf1fd6 (diff)
Expose BER_Decoder constructor taking BER_Object&&
Diffstat (limited to 'src/lib/asn1')
-rw-r--r--src/lib/asn1/ber_dec.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/asn1/ber_dec.h b/src/lib/asn1/ber_dec.h
index 2086eacd3..0f2fb4607 100644
--- a/src/lib/asn1/ber_dec.h
+++ b/src/lib/asn1/ber_dec.h
@@ -47,6 +47,12 @@ class BOTAN_PUBLIC_API(2,0) BER_Decoder final
BER_Decoder(const BER_Object& obj) :
BER_Decoder(obj.bits(), obj.length()) {}
+ /**
+ * Set up to BER decode the data in obj
+ */
+ BER_Decoder(BER_Object&& obj) :
+ BER_Decoder(std::move(obj), nullptr) {}
+
BER_Decoder(const BER_Decoder& other);
BER_Decoder& operator=(const BER_Decoder&) = delete;
@@ -297,7 +303,7 @@ class BOTAN_PUBLIC_API(2,0) BER_Decoder final
{
if((class_tag & CONSTRUCTED) && (class_tag & CONTEXT_SPECIFIC))
{
- BER_Decoder(obj).decode(out, real_type).verify_end();
+ BER_Decoder(std::move(obj)).decode(out, real_type).verify_end();
}
else
{
@@ -339,7 +345,7 @@ BER_Decoder& BER_Decoder::decode_optional(T& out,
{
if((class_tag & CONSTRUCTED) && (class_tag & CONTEXT_SPECIFIC))
{
- BER_Decoder(obj).decode(out).verify_end();
+ BER_Decoder(std::move(obj)).decode(out).verify_end();
}
else
{