From 6de75d132fe44a6f3e6160fec0c2e5e32ed023d3 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Mon, 31 Jul 2017 20:53:57 +0200 Subject: updater: get the signature verification working on Windows The updater itself does not link to NSS on Windows and instead uses the Windows-internal crypto libraries. However the mar executable needs to link against NSS, so we need to split the code a bit. Change-Id: Iea61c716aa507a876fdb444eb28ad828bdea18bd Reviewed-on: https://gerrit.libreoffice.org/40608 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard --- onlineupdate/Executable_updater.mk | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) (limited to 'onlineupdate/Executable_updater.mk') diff --git a/onlineupdate/Executable_updater.mk b/onlineupdate/Executable_updater.mk index ed20b19410d4..6071ae54837a 100644 --- a/onlineupdate/Executable_updater.mk +++ b/onlineupdate/Executable_updater.mk @@ -19,12 +19,17 @@ $(eval $(call gb_Executable_set_include,updater,\ $(eval $(call gb_Executable_use_custom_headers,updater,onlineupdate/generated)) $(eval $(call gb_Executable_use_static_libraries,updater,\ - libmar \ + libmar \ + libmarverify \ updatehelper \ $(if $(filter WNT,$(OS)), \ winhelper )\ )) +$(eval $(call gb_Executable_use_externals,updater,\ + bzip2 \ +)) + ifeq ($(OS),WNT) $(eval $(call gb_Executable_add_libs,updater,\ Ws2_32.lib \ @@ -32,8 +37,26 @@ $(eval $(call gb_Executable_add_libs,updater,\ Comctl32.lib \ Shell32.lib \ Shlwapi.lib \ + Crypt32.lib \ +)) + +$(eval $(call gb_Executable_add_defs,updater,\ + -DVERIFY_MAR_SIGNATURE \ + -DUNICODE \ )) + else + +$(eval $(call gb_Executable_add_defs,updater,\ + -DVERIFY_MAR_SIGNATURE \ + -DNSS3 \ +)) + +$(eval $(call gb_Executable_use_externals,updater,\ + nss3 \ + gtk \ +)) + $(eval $(call gb_Executable_add_libs,updater,\ -lX11 \ -lXext \ @@ -44,19 +67,6 @@ $(eval $(call gb_Executable_add_libs,updater,\ )) endif -$(eval $(call gb_Executable_use_externals,updater,\ - bzip2 \ - nss3 \ - $(if $(filter LINUX,$(OS)), \ - gtk )\ -)) - -$(eval $(call gb_Executable_add_defs,updater,\ - -DVERIFY_MAR_SIGNATURE \ - -DNSS3 \ - -DUNICODE \ -)) - $(eval $(call gb_Executable_add_exception_objects,updater,\ onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator \ onlineupdate/source/update/updater/archivereader \ -- cgit