VirtualBox

Changeset 106247 in vbox for trunk


Ignore:
Timestamp:
Oct 8, 2024 9:50:21 PM (7 weeks ago)
Author:
vboxsync
Message:

Additions/NT/Installer,Config.kmk: Use the same signing commands for the additions installer and uninstaller image as for signing all other executables. VBOX_SIGN_FILE_FN would work differently from VBOX_SIGN_IMAGE_FN when corp signing plans b & c. This caused trouble when the installer loader stub compared its signature with that of the actual installers or the build certificate. bugref:10771

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r106170 r106247  
    45064506        $(if-expr "$4" == "2",$$(NLTAB),$(NLTAB))$(call VBOX_CCS_SIGN_CMD,driver$(if-expr "$3" == "/ph",_pagehash,),$1,,-digest_algo SHA2)
    45074507
    4508   ## Sign an executable image.
     4508  ## Sign an executable image, normal method.
    45094509  # @param 1  The file to sign.
    45104510  # @param 2  File description. Optional.
    45114511  # @param 3  Set to 2 if the expression will be expanded twice before chopped into commands (for _CMDS).
    45124512  if1of (win_with_ev, $(VBOX_WITH_CORP_CODE_SIGNING))
    4513    VBOX_SIGN_IMAGE_FN        ?= $(call VBOX_SIGN_IMAGE_WITH_EV_FN,$(1),$(2),/ph,$(3))
    4514    VBOX_SIGN_IMAGE_ORDERDEPS ?= $(VBOX_RTSIGNTOOL) $(VBOX_SIGNTOOL_ORDERDEPS)
     4513   VBOX_SIGN_IMAGE_NORMAL_FN        ?= $(call VBOX_SIGN_IMAGE_WITH_EV_FN,$(1),$(2),/ph,$(3))
     4514   VBOX_SIGN_IMAGE_NORMAL_ORDERDEPS ?= $(VBOX_RTSIGNTOOL) $(VBOX_SIGNTOOL_ORDERDEPS)
    45154515  else
    4516    VBOX_SIGN_IMAGE_FN        ?= $(call VBOX_SIGN_FILE_FN,$(1),$(2),/ph,$(3))
    4517    VBOX_SIGN_IMAGE_ORDERDEPS ?= $(VBOX_SIGNTOOL_ORDERDEPS)
     4516   VBOX_SIGN_IMAGE_NORMAL_FN        ?= $(call VBOX_SIGN_FILE_FN,$(1),$(2),/ph,$(3))
     4517   VBOX_SIGN_IMAGE_NORMAL_ORDERDEPS ?= $(VBOX_SIGNTOOL_ORDERDEPS)
    45184518  endif
    45194519
     
    45234523   VBOX_SIGN_DRIVER_ORDERDEPS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_RTSIGNTOOL) $(VBOX_SIGNTOOL_ORDERDEPS))
    45244524  else if $(intersects win_planc,$(VBOX_WITH_CORP_CODE_SIGNING))
    4525    VBOX_SIGN_DRIVER_CMDS      ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_IMAGE_FN,$(out),,2,nodual))
     4525   VBOX_SIGN_DRIVER_CMDS      ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_IMAGE_NORMAL_FN,$(out),,2,nodual))
    45264526   VBOX_SIGN_DRIVER_ORDERDEPS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_RTSIGNTOOL) $(VBOX_SIGNTOOL_ORDERDEPS))
    45274527  else
    4528    VBOX_SIGN_DRIVER_CMDS      ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_IMAGE_FN,$(out),,2))
    4529    VBOX_SIGN_DRIVER_ORDERDEPS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_SIGN_IMAGE_ORDERDEPS))
     4528   VBOX_SIGN_DRIVER_CMDS      ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_IMAGE_NORMAL_FN,$(out),,2))
     4529   VBOX_SIGN_DRIVER_ORDERDEPS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_SIGN_IMAGE_NORMAL_ORDERDEPS))
    45304530  endif
    45314531
     
    45534553  endif
    45544554
     4555  ## Functions + deps for signing an executable or a dll image. See VBOX_SIGN_IMAGE_NORMAL_FN for parameters.
     4556  if defined(VBOX_CERTIFICATE_SUBJECT_NAME) && $(intersects win_planb,$(VBOX_WITH_CORP_CODE_SIGNING))
     4557   VBOX_SIGN_IMAGE_FN             ?= $(call VBOX_SIGN_IMAGE_PLAN_B_FN,$(1),$(2),/ph,$(3))
     4558   VBOX_SIGN_IMAGE_ORDERDEPS      ?= $(VBOX_RTSIGNTOOL) $(VBOX_SIGNTOOL_ORDERDEPS)
     4559  else if defined(VBOX_CERTIFICATE_SUBJECT_NAME) && $(intersects win_planc,$(VBOX_WITH_CORP_CODE_SIGNING))
     4560   VBOX_SIGN_IMAGE_FN             ?= $(call VBOX_SIGN_IMAGE_PLAN_C_FN,$(1),$(2),/ph,$(3))
     4561   VBOX_SIGN_IMAGE_ORDERDEPS      ?= $(VBOX_RTSIGNTOOL) $(VBOX_SIGNTOOL_ORDERDEPS)
     4562  else
     4563   VBOX_SIGN_IMAGE_FN             ?= $(call VBOX_SIGN_IMAGE_NORMAL_FN,$(1),$(2),$(3))
     4564   VBOX_SIGN_IMAGE_ORDERDEPS      ?= $(VBOX_SIGN_IMAGE_NORMAL_ORDERDEPS)
     4565  endif
     4566
    45554567  # Go nuts, sign everything.
    45564568  if "$(VBOX_SIGNING_MODE)" == "release" || defined(VBOX_WITH_HARDENING)
     
    45634575    VBOX_SIGN_IMAGE_CMDS_ORDERDEPS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_RTSIGNTOOL) $(VBOX_SIGNTOOL_ORDERDEPS))
    45644576   else
    4565     VBOX_SIGN_IMAGE_CMDS           ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_IMAGE_FN,$(out),,2))
    4566     VBOX_SIGN_IMAGE_CMDS_ORDERDEPS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_SIGN_IMAGE_ORDERDEPS))
     4577    VBOX_SIGN_IMAGE_CMDS           ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_IMAGE_NORMAL_FN,$(out),,2))
     4578    VBOX_SIGN_IMAGE_CMDS_ORDERDEPS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_SIGN_IMAGE_NORMAL_ORDERDEPS))
    45674579   endif
    45684580  endif
  • trunk/src/VBox/Additions/WINNT/Installer/Makefile.kmk

    r106061 r106247  
    316316                $(if $(VBOX_WIN_ATTESTATION_SIGNING),$(PATH_OUT)/repackadd/$(VBOX_SIGNED_DRIVERS_ZIP_NAME)) \
    317317                $(VBOX_VERSION_STAMP) \
    318                 $$(VBoxDrvInst_1_STAGE_TARGET)
     318                $$(VBoxDrvInst_1_STAGE_TARGET) \
     319                | $(VBOX_SIGN_IMAGE_ORDERDEPS)
    319320        $(call MSG_L1,Creating $@, from $<)
    320 ifdef VBOX_WIN_ATTESTATION_SIGNING # Unpack the attestation signed drivers - this is an ugly has 'ing heck hack!
     321ifdef VBOX_WIN_ATTESTATION_SIGNING # Unpack the attestation signed drivers - this is an ugly as 'ing heck hack!
    321322        $(TOOL_ZIP_UNPACK) -oj $(PATH_OUT)/repackadd/$(VBOX_SIGNED_DRIVERS_ZIP_NAME) -d $(PATH_STAGE_BIN)/additions/
    322323endif
     
    332333                        $(foreach lang,$(VBOX_INSTALLER_ADD_LANGUAGES),'/DVBOX_BRAND_$(lang)_LICENSE_RTF=1') \
    333334                        '$(subst /,\,$<)'
    334         $(call VBOX_SIGN_FILE_FN,$@)
     335        $(call VBOX_SIGN_IMAGE_FN,$@)
    335336
    336337
     
    378379                        '$(subst /,\,$<)'
    379380
    380  $(PATH_TARGET)/uninst.exe: $(PATH_TARGET)/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH)-uninst.exe | $$(dir $$@)
     381 $(PATH_TARGET)/uninst.exe: \
     382                $(PATH_TARGET)/VBoxWindowsAdditions-$(KBUILD_TARGET_ARCH)-uninst.exe | $$(dir $$@) $(VBOX_SIGN_IMAGE_ORDERDEPS)
    381383        $(call MSG_L1,Creating $@, from $<)
    382384        $(QUIET)$(RM) -f $@
    383385        -$(REDIRECT) -E __COMPAT_LAYER=RUNASINVOKER -- $<
    384386        $(TEST) -f $@
    385         $(call VBOX_SIGN_FILE_FN,$@)
     387        $(call VBOX_SIGN_IMAGE_FN,$@)
    386388
    387389endif # VBOX_SIGNING_MODE
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