diff options
Diffstat (limited to 'src/x509_ext.cpp')
-rw-r--r-- | src/x509_ext.cpp | 38 |
1 files changed, 23 insertions, 15 deletions
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() |