From 8d941c1b784def27cd484b3af0aa097a884503ac Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Wed, 7 Oct 2026 07:41:26 -0700 Subject: [PATCH] Sign all PE files in Windows distro --- mswin32/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mswin32/Makefile b/mswin32/Makefile index 0bfa74dee..3729dbaae 100644 --- a/mswin32/Makefile +++ b/mswin32/Makefile @@ -92,9 +92,10 @@ nmap-$(NMAP_VERSION)${OEM_SUFFIX}/Uninstall.exe: nsis/Nmap.nsi LICENSE.formatted stage-nmap-main: build-nmap${OEM_SUFFIX} nmap-$(NMAP_VERSION)${OEM_SUFFIX}/Uninstall.exe cp $(VCCONFIG)${OEM_SUFFIX}/nmap.exe nmap-$(NMAP_VERSION)${OEM_SUFFIX}/ -sign-files: nmap-$(NMAP_VERSION)-oem/nmap.exe nmap-$(NMAP_VERSION)/nmap.exe nmap-$(NMAP_VERSION)-oem/Uninstall.exe nmap-$(NMAP_VERSION)/Uninstall.exe nmap-$(NMAP_VERSION)/ncat.exe nmap-$(NMAP_VERSION)/nping.exe nmap-$(NMAP_VERSION)/libssh2.dll nmap-$(NMAP_VERSION)/libcrypto-3.dll nmap-$(NMAP_VERSION)/libssl-3.dll nmap-$(NMAP_VERSION)/zlibwapi.dll - # TODO: evaluate whether we should also sign the Python stuff for Zenmap, Ndiff - "$(SIGNTOOL)" $(SIGNTOOL_ARGS) $^ nmap-$(NMAP_VERSION)/zenmap/bin/* nmap-$(NMAP_VERSION)/zenmap/lib/gdk-pixbuf-2.0/*/loaders/*.dll +SIGN_FILES = $(shell find nmap-$(NMAP_VERSION) nmap-$(NMAP_VERSION)-oem \ + -type f \( -name '*.exe' -o -name '*.dll' -o -name '*.pyd' \)) +sign-files: $(SIGN_FILES) + "$(SIGNTOOL)" $(SIGNTOOL_ARGS) $? touch sign-files bundle-nsis: sign-files