aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/x509_ext.h4
-rw-r--r--src/x509_ext.cpp10
2 files changed, 3 insertions, 11 deletions
diff --git a/include/x509_ext.h b/include/x509_ext.h
index b26913feb..f9d273835 100644
--- a/include/x509_ext.h
+++ b/include/x509_ext.h
@@ -51,7 +51,6 @@ 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;
@@ -61,7 +60,7 @@ class Extensions : public ASN1_Object
Extensions& operator=(const Extensions& e)
{ return copy_this(e); }
- Extensions() {}
+ Extensions(bool st = true) : should_throw(st) {}
Extensions(const Extensions& e) : ASN1_Object() { copy_this(e); }
~Extensions();
private:
@@ -70,6 +69,7 @@ class Extensions : public ASN1_Object
static Certificate_Extension* make_extension(const OID&);
std::vector<Certificate_Extension*> extensions;
+ bool should_throw;
};
namespace Cert_Extension {
diff --git a/src/x509_ext.cpp b/src/x509_ext.cpp
index 37d053e70..d173df9a7 100644
--- a/src/x509_ext.cpp
+++ b/src/x509_ext.cpp
@@ -48,14 +48,6 @@ 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();
@@ -78,7 +70,7 @@ void Extensions::decode_from(BER_Decoder& from_source, bool throw_on_unknown)
if(!ext)
{
- if(!critical || !throw_on_unknown)
+ if(!critical || !should_throw)
continue;
throw Decoding_Error("Encountered unknown X.509 extension marked "