summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-25 13:31:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-25 19:56:32 +0200
commita2a98f62182561444d7841f0908d7423ab595675 (patch)
treecea5095eb6c2e3c76c3fd4a731ea49e90bfded58 /desktop
parentconfigure: Replace tabs with spaces (diff)
downloadcore-a2a98f62182561444d7841f0908d7423ab595675.tar.gz
core-a2a98f62182561444d7841f0908d7423ab595675.zip
fix some crypto leaks
Change-Id: I8f0eddd5ec82200dca374c2191ed5ac28c66089a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116100 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/CppunitTest_desktop_lib.mk6
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx13
2 files changed, 19 insertions, 0 deletions
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 <config_oox.h>
#include <memory>
#include <string_view>
@@ -59,6 +60,10 @@
#include <cppunit/TestAssert.h>
+#if USE_TLS_NSS
+#include <nss.h>
+#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<sal_uInt8> & rByteVector);
@@ -290,6 +296,13 @@ public:
std::unique_ptr<LibLODocument_Impl> m_pDocument;
};
+DesktopLOKTest::~DesktopLOKTest()
+{
+#if USE_TLS_NSS
+ NSS_Shutdown();
+#endif
+}
+
static Control* GetFocusControl(vcl::Window const * pParent)
{
sal_uInt16 nChildren = pParent->GetChildCount();