aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-07 05:20:02 +0000
committerlloyd <[email protected]>2008-04-07 05:20:02 +0000
commit36610a40a872dd98162177c9ee463ef259aff054 (patch)
tree7a7400571f2bc8d060b828f024c10f3b7410cb62
parenta2e45efa784ec1a75e7a6ec06d9a4f02461216aa (diff)
parent29885981670e06413738458c11f632c5b87bb031 (diff)
propagate from branch 'net.randombit.botan' (head db3791f6bba4b57dd8aed17893565dc5bcd68f02)
to branch 'net.randombit.botan.remove-libstate' (head 627d12447b2bb32aa08ff5daa499ac9580a77a05)
-rw-r--r--include/x509_ext.h6
-rw-r--r--src/x509_ext.cpp38
2 files changed, 25 insertions, 19 deletions
diff --git a/include/x509_ext.h b/include/x509_ext.h
index 2e7370fbd..13a58d7d5 100644
--- a/include/x509_ext.h
+++ b/include/x509_ext.h
@@ -50,14 +50,12 @@ class Extensions : public ASN1_Object
void add(Certificate_Extension* extn)
{ extensions.push_back(extn); }
- Extensions& operator=(const Extensions& e)
- { return copy_this(e); }
+ Extensions& operator=(const Extensions&);
+ Extensions(const Extensions&);
Extensions(bool st = true) : should_throw(st) {}
- Extensions(const Extensions& e) : ASN1_Object() { copy_this(e); }
~Extensions();
private:
- Extensions& copy_this(const Extensions&);
std::vector<Certificate_Extension*> extensions;
bool should_throw;
};
diff --git a/src/x509_ext.cpp b/src/x509_ext.cpp
index 65ea2872c..197a86004 100644
--- a/src/x509_ext.cpp
+++ b/src/x509_ext.cpp
@@ -18,6 +18,29 @@
namespace Botan {
/*************************************************
+* Extensions Copy Constructor *
+*************************************************/
+Extensions::Extensions(const Extensions& extensions) : ASN1_Object()
+ {
+ *this = extensions;
+ }
+
+/*************************************************
+* Extensions Assignment Operator *
+*************************************************/
+Extensions& Extensions::operator=(const Extensions& other)
+ {
+ for(u32bit j = 0; j != extensions.size(); ++j)
+ delete extensions[j];
+ extensions.clear();
+
+ for(u32bit j = 0; j != other.extensions.size(); ++j)
+ extensions.push_back(other.extensions[j]->copy());
+
+ return (*this);
+ }
+
+/*************************************************
* Return the OID of this extension *
*************************************************/
OID Certificate_Extension::oid_of() const
@@ -114,21 +137,6 @@ void Extensions::contents_to(Data_Store& subject_info,
}
/*************************************************
-* Copy another extensions list *
-*************************************************/
-Extensions& Extensions::copy_this(const Extensions& other)
- {
- for(u32bit j = 0; j != extensions.size(); ++j)
- delete extensions[j];
- extensions.clear();
-
- for(u32bit j = 0; j != other.extensions.size(); ++j)
- extensions.push_back(other.extensions[j]->copy());
-
- return (*this);
- }
-
-/*************************************************
* Delete an Extensions list *
*************************************************/
Extensions::~Extensions()