From a2a98f62182561444d7841f0908d7423ab595675 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 25 May 2021 13:31:32 +0200 Subject: [PATCH] fix some crypto leaks Change-Id: I8f0eddd5ec82200dca374c2191ed5ac28c66089a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116100 Tested-by: Jenkins Reviewed-by: Noel Grandin --- desktop/CppunitTest_desktop_lib.mk | 6 ++++++ desktop/qa/desktop_lib/test_desktop_lib.cxx | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/desktop/CppunitTest_desktop_lib.mk b/desktop/CppunitTest_desktop_lib.mk index 68a7ca8f2aed..4e5ff292102b 100644 --- a/desktop/CppunitTest_desktop_lib.mk +++ b/desktop/CppunitTest_desktop_lib.mk @@ -38,6 +38,12 @@ $(eval $(call gb_CppunitTest_use_externals,desktop_lib, \ boost_headers \ cairo \ )) +ifeq ($(TLS),NSS) +$(eval $(call gb_CppunitTest_use_externals,desktop_lib,\ + plc4 \ + nss3 \ +)) +endif $(eval $(call gb_CppunitTest_set_include,desktop_lib,\ -I$(SRCDIR)/desktop/inc \ diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 13370261a0fc..2a26b04dcfa0 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -7,6 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include #include #include @@ -59,6 +60,10 @@ #include +#if USE_TLS_NSS +#include +#endif + using namespace com::sun::star; using namespace desktop; @@ -95,6 +100,7 @@ public: m_nTrackChanges(0) { } + ~DesktopLOKTest(); void readFileIntoByteVector( std::u16string_view sFilename, std::vector & rByteVector); @@ -290,6 +296,13 @@ public: std::unique_ptr m_pDocument; }; +DesktopLOKTest::~DesktopLOKTest() +{ +#if USE_TLS_NSS + NSS_Shutdown(); +#endif +} + static Control* GetFocusControl(vcl::Window const * pParent) { sal_uInt16 nChildren = pParent->GetChildCount();