# $Id: Makefile.kmk 77769 2019-03-18 19:16:22Z vboxsync $ ## @file # Sub-Makefile for the Windows NT Additions Tools. # # # Copyright (C) 2012-2019 Oracle Corporation # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; # you can redistribute it and/or modify it under the terms of the GNU # General Public License (GPL) as published by the Free Software # Foundation, in version 2 as it comes in the "COPYING" file of the # VirtualBox OSE distribution. VirtualBox OSE is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. # SUB_DEPTH = ../../../../.. include $(KBUILD_PATH)/subheader.kmk # # Certificate utility. # PROGRAMS += VBoxCertUtil VBoxCertUtil_TEMPLATE = VBoxGuestR3Exe VBoxCertUtil_SOURCES = \ VBoxCertUtil.cpp \ VBoxCertUtil.rc VBoxCertUtil_LIBS = \ crypt32.lib # The icon is configurable. VBoxCertUtil.rc_INCS = $(VBoxCertUtil_0_OUTDIR) VBoxCertUtil.rc_DEPS = $(VBoxCertUtil_0_OUTDIR)/VBoxCertUtil-win-icon.rc VBoxCertUtil.rc_CLEAN = $(VBoxCertUtil_0_OUTDIR)/VBoxCertUtil-win-icon.rc # Icon include file. $$(VBoxCertUtil_0_OUTDIR)/VBoxCertUtil-win-icon.rc: $(VBOX_WINDOWS_ADDITIONS_ICON_FILE) $$(VBoxCertUtil_DEFPATH)/Makefile.kmk | $$(dir $$@) $(RM) -f $@ $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(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 endif include $(FILE_KBUILD_SUB_FOOTER)