# $Id: Makefile.kmk 96407 2022-08-22 17:43:14Z vboxsync $ ## @file # Sub-Makefile for the Windows NT Additions Tools. # # # Copyright (C) 2012-2022 Oracle and/or its affiliates. # # This file is part of VirtualBox base platform packages, as # available from https://www.virtualbox.org. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation, in version 3 of the # License. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # SPDX-License-Identifier: GPL-3.0-only # SUB_DEPTH = ../../../../.. include $(KBUILD_PATH)/subheader.kmk # # Certificate utility. # PROGRAMS += VBoxCertUtil VBoxCertUtil_TEMPLATE = VBoxGuestR3Exe VBoxCertUtil_SOURCES = \ VBoxCertUtil.cpp VBoxCertUtil_LIBS = \ crypt32.lib $(call VBOX_SET_VER_INFO_EXE,VBoxCertUtil,VirtualBox Certificate Utility,$(VBOX_WINDOWS_ADDITIONS_ICON_FILE)) # # Install all the certificates we use here. # INSTALLS += AdditionsInstCertFiles AdditionsInstCertFiles_TEMPLATE = VBoxGuestR3Exe AdditionsInstCertFiles_SOURCES = AdditionsInstCertFiles_CLEAN = ifdef VBOX_SIGNING_MODE define def_VBoxAdditionsInstCertFiles AdditionsInstCertFiles_SOURCES += $$(AdditionsInstCertFiles_0_OUTDIR)/$(1)=>$1 AdditionsInstCertFiles_CLEAN += $$(AdditionsInstCertFiles_0_OUTDIR)/$(1) $$$$(AdditionsInstCertFiles_0_OUTDIR)/$(1): $$(2) | $$$$(dir $$$$@) $(VBOX_RTSIGNTOOL) $(QUIET)$(RM) -f -- "$$@" $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --signature-index $3 --exe "$$<" --output "$$@" --der endef if !defined(VBOX_CERTIFICATE_SHA2_SUBJECT_NAME) && !$(intersects win all 1,$(VBOX_WITH_CORP_CODE_SIGNING)) $(evalcall2 def_VBoxAdditionsInstCertFiles,vbox.cer,$(VBOX_PATH_ADDITIONS)/VBoxGuest.sys,0) else $(evalcall2 def_VBoxAdditionsInstCertFiles,vbox-sha1.cer,$(VBOX_PATH_ADDITIONS)/VBoxGuest.sys,0) $(evalcall2 def_VBoxAdditionsInstCertFiles,vbox-sha256.cer,$(VBOX_PATH_ADDITIONS)/VBoxGuest.sys,1) if $(intersects win_planb,$(VBOX_WITH_CORP_CODE_SIGNING)) $(evalcall2 def_VBoxAdditionsInstCertFiles,vbox-sha256-r3.cer,$(VBOX_PATH_ADDITIONS)/VBoxCertUtil.exe,1) endif endif ifdef VBOX_WITH_VBOX_LEGACY_TS_CA AdditionsInstCertFiles_SOURCES += $(VBOX_LEGACY_TS_CA_FILE)=>vbox-legacy-timestamp-ca.cer endif endif # # Install the registry file for bypassing the Windows 11 installer checks. # INSTALLS += AdditionsInstW11Bypass AdditionsInstW11Bypass_INST = $(INST_ADDITIONS) AdditionsInstW11Bypass_MODE = a+r,u+w AdditionsInstW11Bypass_SOURCES = windows11-bypass.reg include $(FILE_KBUILD_SUB_FOOTER)