From f0ccd62149e466d4fbf1fb2c57227c4d3cee190c Mon Sep 17 00:00:00 2001 From: lloyd Date: Sun, 8 Mar 2015 14:15:34 +0000 Subject: Fix memory leak in TLS tests. Remove last few remaining uses of auto_ptr. --- src/lib/cert/x509/certstor.cpp | 5 +++++ src/lib/cert/x509/certstor.h | 2 ++ 2 files changed, 7 insertions(+) (limited to 'src/lib/cert') diff --git a/src/lib/cert/x509/certstor.cpp b/src/lib/cert/x509/certstor.cpp index d7e6f0a65..d075fe706 100644 --- a/src/lib/cert/x509/certstor.cpp +++ b/src/lib/cert/x509/certstor.cpp @@ -108,6 +108,11 @@ const X509_CRL* Certificate_Store_In_Memory::find_crl_for(const X509_Certificate return nullptr; } +Certificate_Store_In_Memory::Certificate_Store_In_Memory(const X509_Certificate& cert) + { + add_certificate(cert); + } + Certificate_Store_In_Memory::Certificate_Store_In_Memory(const std::string& dir) { if(dir == "") diff --git a/src/lib/cert/x509/certstor.h b/src/lib/cert/x509/certstor.h index 6d6de2e7a..eb42c6a49 100644 --- a/src/lib/cert/x509/certstor.h +++ b/src/lib/cert/x509/certstor.h @@ -50,6 +50,8 @@ class BOTAN_DLL Certificate_Store_In_Memory : public Certificate_Store */ Certificate_Store_In_Memory(const std::string& dir); + Certificate_Store_In_Memory(const X509_Certificate& cert); + Certificate_Store_In_Memory() {} void add_certificate(const X509_Certificate& cert); -- cgit v1.2.3