fix leak in CppunitTest_oox_crypto

Change-Id: I41d4fe581842cb7822ae899dc6ee6a43e485d211
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115856
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2021-05-20 13:11:35 +02:00
parent 39001d0ad8
commit 2601814987
+13
View File
@@ -7,6 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <config_oox.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/TestFixture.h>
@@ -20,11 +21,16 @@
#include <oox/helper/binaryinputstream.hxx>
#include <oox/helper/binaryoutputstream.hxx>
#if USE_TLS_NSS
#include <nss.h>
#endif
using namespace css;
class CryptoTest : public CppUnit::TestFixture
{
public:
virtual ~CryptoTest() override;
void testCryptoHash();
void testRoundUp();
void testStandard2007();
@@ -58,6 +64,13 @@ std::string toString(std::vector<sal_uInt8> const& aInput)
}
}
CryptoTest::~CryptoTest()
{
#if USE_TLS_NSS
NSS_Shutdown();
#endif
}
void CryptoTest::testCryptoHash()
{
// Check examples from Wikipedia (https://en.wikipedia.org/wiki/HMAC)