VirtualBox

Ignore:
Timestamp:
Dec 16, 2016 11:47:16 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
112348
Message:

Additions/win: Don't depend on the checked in certificate, but rather extract the code signing certificates from VBoxGuest.sys and VBoxCertUtil.exe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/tools/Makefile.kmk

    r63107 r64935  
    1818include $(KBUILD_PATH)/subheader.kmk
    1919
     20#
     21# Certificate utility.
     22#
    2023PROGRAMS += VBoxCertUtil
    2124
    2225VBoxCertUtil_TEMPLATE = VBoxGuestR3Exe
    2326VBoxCertUtil_SOURCES = \
    24     VBoxCertUtil.cpp \
    25     VBoxCertUtil.rc
     27        VBoxCertUtil.cpp \
     28        VBoxCertUtil.rc
    2629VBoxCertUtil_LIBS = \
    27     crypt32.lib
     30        crypt32.lib
    2831
    29 #
    3032# The icon is configurable.
    31 #
    3233VBoxCertUtil.rc_INCS = $(VBoxCertUtil_0_OUTDIR)
    3334VBoxCertUtil.rc_DEPS = $(VBoxCertUtil_0_OUTDIR)/VBoxCertUtil-win-icon.rc
     
    3940        $(APPEND) $@ 'IDI_VIRTUALBOX ICON DISCARDABLE "$(subst /,\\,$(VBOX_WINDOWS_ADDITIONS_ICON_FILE))"'
    4041
     42
     43#
     44# Install all the certificates we use here.
     45#
     46INSTALLS += AdditionsInstCertFiles
     47AdditionsInstCertFiles_TEMPLATE = VBoxGuestR3Exe
     48AdditionsInstCertFiles_SOURCES  =
     49AdditionsInstCertFiles_CLEAN    =
     50ifdef VBOX_SIGNING_MODE
     51 define def_VBoxAdditionsInstCertFiles
     52  AdditionsInstCertFiles_SOURCES += $$(AdditionsInstCertFiles_0_OUTDIR)/$(1)=>$1
     53  AdditionsInstCertFiles_CLEAN   += $$(AdditionsInstCertFiles_0_OUTDIR)/$(1)
     54  $$$$(AdditionsInstCertFiles_0_OUTDIR)/$(1): $$(2) | $$$$(dir $$$$@)
     55        $(QUIET)$(RM) -f -- "$$@"
     56        $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --signature-index $3 --exe "$$<" --output "$$@" --der
     57 endef
     58
     59 if "$(VBOX_WITH_CORP_CODE_SIGNING)" == "all" || (!defined(VBOX_CERTIFICATE_SHA2_SUBJECT_NAME) && !defined(VBOX_WITH_CORP_CODE_SIGNING))
     60  $(evalcall2 def_VBoxAdditionsInstCertFiles,oracle-vbox.cer,$(VBOX_PATH_ADDITIONS)/VBoxGuest.sys,0)
     61 else
     62  $(evalcall2 def_VBoxAdditionsInstCertFiles,oracle-vbox-sha1.cer,$(VBOX_PATH_ADDITIONS)/VBoxGuest.sys,0)
     63  $(evalcall2 def_VBoxAdditionsInstCertFiles,oracle-vbox-sha256.cer,$(VBOX_PATH_ADDITIONS)/VBoxGuest.sys,1)
     64  if defined(VBOX_CERTIFICATE_SHA2_SUBJECT_NAME) && defined(VBOX_WITH_CORP_CODE_SIGNING)
     65   $(evalcall2 def_VBoxAdditionsInstCertFiles,oracle-vbox-sha256-r3.cer,$(VBOX_PATH_ADDITIONS)/VBoxCertUtil.exe,1)
     66  endif
     67 endif
     68endif
     69
    4170include $(FILE_KBUILD_SUB_FOOTER)
    4271
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette