diff options
author | Jack Lloyd <[email protected]> | 2017-03-03 22:27:42 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-03-03 22:27:42 -0500 |
commit | 76fb731331fc380f41d76a0788b22b3d7216fd82 (patch) | |
tree | c1380e57c6fc908b5a5b5da6059678e1255987fe /src/tests | |
parent | 6203025a02b052fbaebb4b309104497a22737187 (diff) | |
parent | eeaa4d3ab4248b304fa66f6c632399772b3ae9cf (diff) |
Merge GH #904 Fix memory leak in TLS tests
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/unit_tls.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tests/unit_tls.cpp b/src/tests/unit_tls.cpp index 933ccfe39..77aebce93 100644 --- a/src/tests/unit_tls.cpp +++ b/src/tests/unit_tls.cpp @@ -57,7 +57,7 @@ class Credentials_Manager_Test : public Botan::Credentials_Manager const Botan::X509_Certificate* dsa_cert, Botan::Private_Key* dsa_key, const Botan::X509_Certificate* dsa_ca, - const Botan::X509_CRL* dsa_crl) : + Botan::X509_CRL* dsa_crl) : m_rsa_cert(rsa_cert), m_rsa_ca(rsa_ca), m_rsa_key(rsa_key), @@ -66,7 +66,8 @@ class Credentials_Manager_Test : public Botan::Credentials_Manager m_ecdsa_key(ecdsa_key), m_dsa_cert(dsa_cert), m_dsa_ca(dsa_ca), - m_dsa_key(dsa_key) + m_dsa_key(dsa_key), + m_dsa_crl(dsa_crl) { std::unique_ptr<Botan::Certificate_Store_In_Memory> store(new Botan::Certificate_Store_In_Memory); store->add_certificate(m_rsa_ca); @@ -78,9 +79,9 @@ class Credentials_Manager_Test : public Botan::Credentials_Manager { store->add_certificate(*m_dsa_ca); } - if(dsa_crl != nullptr) + if(m_dsa_crl != nullptr) { - store->add_crl(*dsa_crl); + store->add_crl(*m_dsa_crl); } m_stores.push_back(std::move(store)); @@ -176,6 +177,7 @@ class Credentials_Manager_Test : public Botan::Credentials_Manager std::unique_ptr<const Botan::X509_Certificate> m_dsa_cert, m_dsa_ca; std::unique_ptr<Botan::Private_Key> m_dsa_key; + std::unique_ptr<Botan::X509_CRL> m_dsa_crl; std::vector<std::unique_ptr<Botan::Certificate_Store>> m_stores; bool m_provides_client_certs; }; |