aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/x509_ext.h1
-rw-r--r--src/x509_ext.cpp8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/x509_ext.h b/include/x509_ext.h
index 147f17aa5..b26913feb 100644
--- a/include/x509_ext.h
+++ b/include/x509_ext.h
@@ -51,6 +51,7 @@ class Extensions : public ASN1_Object
public:
void encode_into(class DER_Encoder&) const;
void decode_from(class BER_Decoder&);
+ void decode_from(class BER_Decoder&, bool);
void contents_to(Data_Store&, Data_Store&) const;
diff --git a/src/x509_ext.cpp b/src/x509_ext.cpp
index 6f5e76645..d9e93a9af 100644
--- a/src/x509_ext.cpp
+++ b/src/x509_ext.cpp
@@ -48,6 +48,14 @@ void Extensions::encode_into(DER_Encoder& to_object) const
*************************************************/
void Extensions::decode_from(BER_Decoder& from_source)
{
+ decode_from(from_source, true);
+ }
+
+/*************************************************
+* Decode a list of Extensions *
+*************************************************/
+void Extensions::decode_from(BER_Decoder& from_source, bool throw_on_unknown)
+ {
for(u32bit j = 0; j != extensions.size(); ++j)
delete extensions[j];
extensions.clear();