Changeset 64917 in vbox
- Timestamp:
- Dec 16, 2016 4:33:46 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 112330
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r64915 r64917 3055 3055 $(error VBOX_SIGNING_MODE must be either 'test' or 'release'. The value '$(VBOX_SIGNING_MODE)' is not recognized.) 3056 3056 endif 3057 # Corp code signing .3057 # Corp code signing client. 3058 3058 VBOX_CCS_CLIENT_JAR := $(firstword $(rsort \ 3059 3059 $(wildcard $(KBUILD_DEVTOOLS)/common/ccs/v*/Client.jar)) \ … … 3068 3068 # @param $3 The directory to put the signed file in. Defaults to $(dir $2). 3069 3069 # @param $4 Additional options. 3070 VBOX_CCS_SIGN_CMD = $(VBOX_ JAVA) -jar "$(VBOX_CCS_CLIENT_JAR)" \3070 VBOX_CCS_SIGN_CMD = $(VBOX_RETRY) $(VBOX_JAVA) -jar "$(VBOX_CCS_CLIENT_JAR)" \ 3071 3071 sign -user "$(VBOX_CCS_USER)" -global_uid "$(VBOX_CCS_GLOBAL_UID)" -server "$(VBOX_CCS_SERVER)" \ 3072 3072 -sign_method "$1" -file_to_sign "$2" -signed_location "$(if $3,$3,$(dir $2))" $4 … … 3134 3134 ,/sha1 "$(subst $(SP),,$(VBOX_CERTIFICATE_SHA2_FINGERPRINT))",) # Still using SHA-1 for fingerprinting, it's good enough for that! 3135 3135 3136 ## Commands for signing a driver image after link.3137 VBOX_SIGN_DRIVER_CMDS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_IMAGE_FN,$(out),,2))3138 3136 ## Sign a file (generic). 3139 3137 # @param 1 The file to sign. … … 3143 3141 # @param 5 Disables dual signing if non-empty. 3144 3142 ifndef VBOX_SIGN_FILE_FN 3145 ifdef VBOX_CERTIFICATE_SHA2_SUBJECT_NAME 3143 ifeq ($(VBOX_WITH_CORP_CODE_SIGNING), all) 3144 VBOX_SIGN_FILE_FN = $(call VBOX_CCS_SIGN_CMD,driver,$1,$(dir $1)) 3145 else ifdef VBOX_CERTIFICATE_SHA2_SUBJECT_NAME 3146 3146 VBOX_SIGN_FILE_FN = $(VBOX_SIGNTOOL) \ 3147 3147 sign /fd sha1\ … … 3178 3178 endif 3179 3179 3180 ## Corp code signing for drivers and catalogs, plan B. 3181 # 3182 # Since the corp code signing cannot dual signing and doesn't even have a 3183 # SHA-1 cert, we have to get creative: 3184 # 1. Sign $1 using local SHA-1 certificate. 3185 # 2. Make temporary copy of $1 as $1.ccs 3186 # 3. Do SHA-256 corp code signing of $1.ccs 3187 # 4. Add the SHA-256 signature from $1.ccs to $1 using bldRTSignTool. 3188 # 5. Delete $1.ccs. 3189 # 3190 # @param 1 The file to sign. 3191 # @param 2 File description. Optional. 3192 # @param 3 Additional parameters. Optional. 3193 # @param 4 Set to 2 if the expression will be expanded twice before chopped into commands (for _CMDS). 3194 # @param 5 Disables dual signing if non-empty. 3195 # 3196 # @remarks The parameters are the same as VBOX_SIGN_FILE_FN. 3197 VBOX_SIGN_IMAGE_PLAN_B_FN = $(warning VBOX_SIGN_IMAGE_PLAN_B_FN: 1=$1 2=$2 3=$3 4=$4 5=$5)$(VBOX_SIGNTOOL) \ 3198 sign /fd sha1\ 3199 $(VBOX_CROSS_CERTIFICATE_FILE_ARGS) \ 3200 $(VBOX_CERTIFICATE_STORE_ARGS) \ 3201 $(VBOX_CERTIFICATE_SUBJECT_NAME_ARGS) \ 3202 $(VBOX_CERTIFICATE_FINGERPRINT_ARGS) \ 3203 $(VBOX_TSA_URL_ARGS) \ 3204 $(if $(strip $(2)),/d "$(strip $(2))",) \ 3205 $(3) \ 3206 $(1) \ 3207 $(if-expr "$5" == "",\ 3208 $(if-expr "$4" == "2",$$(NLTAB),$(NLTAB))$(RM) -f -- "$1.ccs" \ 3209 $(if-expr "$4" == "2",$$(NLTAB),$(NLTAB))$(CP) -- "$1" "$1.ccs" \ 3210 $(if-expr "$4" == "2",$$(NLTAB),$(NLTAB))$(call VBOX_CCS_SIGN_CMD,driver$(if-expr "$3" == "/ph",_pagehash,),$1.ccs,$(dir $1.ccs),-digest_algo SHA2) \ 3211 $(if-expr "$4" == "2",$$(NLTAB),$(NLTAB))$(VBOX_RTSIGNTOOL) add-nested-$(if-expr "$(suffix $1)" == ".cat",cat,exe)-signature -v "$1" "$1.ccs" \ 3212 $(if-expr "$4" == "2",$$(NLTAB),$(NLTAB))$(RM) -f -- "$1.ccs" \ 3213 ,) 3214 3180 3215 ## Sign an executable image. 3181 3216 # @param 1 The file to sign. … … 3184 3219 VBOX_SIGN_IMAGE_FN ?= $(call VBOX_SIGN_FILE_FN,$(1),$(2),/ph,$(3)) 3185 3220 3221 ## Commands for signing a driver image after link. 3222 if defined(VBOX_WITH_CORP_CODE_SIGNING) && "$(VBOX_WITH_CORP_CODE_SIGNING)" != "all" 3223 VBOX_SIGN_DRIVER_CMDS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_IMAGE_PLAN_B_FN,$(out),,/ph,2)) 3224 VBOX_SIGN_DRIVER_ORDERDEPS ?= $(VBOX_RTSIGNTOOL) 3225 else 3226 VBOX_SIGN_DRIVER_CMDS ?= $(if $(eq $(tool_do),LINK_LIBRARY),,$(call VBOX_SIGN_IMAGE_FN,$(out),,2)) 3227 endif 3228 3186 3229 ## Create a security catalog file. 3187 3230 # @param 1 The directory containing the stuff to sign. 3188 3231 # @param 2 The expected .cat name. (Inf2Cat lowercases it) 3189 3232 # @param 3 The list of OSes, separated by ';'. 3190 VBOX_MAKE_CAT_HLP_FN ?= \ 3191 $(RM) -f $(2)\ 3192 $(NL)$(TAB)$(VBOX_INF2CAT) /driver:$(strip $(1)) /os:$(strip $(subst ;,$(COMMA),$(3))) /verbose \ 3193 $(NL)$(TAB)$(MV) $(2) $(2) \ 3194 $(NL)$(TAB)$(call VBOX_SIGN_FILE_FN,$(2),,,$(NL)$(TAB)) 3233 ifndef VBOX_MAKE_CAT_HLP_FN 3234 VBOX_MAKE_CAT_HLP_FN = \ 3235 $(RM) -f -- "$(2)"\ 3236 $(NL)$(TAB)$(VBOX_INF2CAT) "/driver:$(strip $(1))" "/os:$(strip $(subst ;,$(COMMA),$(3)))" /verbose \ 3237 $(NL)$(TAB)$(MV) -- "$(2)" "$(2)" 3238 if defined(VBOX_WITH_CORP_CODE_SIGNING) && "$(VBOX_WITH_CORP_CODE_SIGNING)" != "all" 3239 VBOX_MAKE_CAT_HLP_FN += $(NL)$(TAB)$(call VBOX_SIGN_IMAGE_PLAN_B_FN,$(2),,,$(NL)$(TAB)) 3240 else 3241 VBOX_MAKE_CAT_HLP_FN += $(NL)$(TAB)$(call VBOX_SIGN_FILE_FN,$(2),,,$(NL)$(TAB)) 3242 endif 3243 endif 3195 3244 VBOX_MAKE_CAT64_FN ?= $(call VBOX_MAKE_CAT_HLP_FN,$(1),$(2),XP_X64;Server2003_X64;Vista_X64) 3196 3245 VBOX_MAKE_CAT32_FN ?= $(call VBOX_MAKE_CAT_HLP_FN,$(1),$(2),2000;XP_X86;Server2003_X86;Vista_X86) … … 3975 4024 TEMPLATE_VBoxR0_LIBS.x86 = \ 3976 4025 $(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/int64.lib 4026 TEMPLATE_VBoxR0_ORDERDEPS = $(VBOX_SIGN_DRIVER_ORDERDEPS) 3977 4027 TEMPLATE_VBoxR0_POST_CMDS = $(VBOX_SIGN_DRIVER_CMDS) 3978 4028 endif # pe … … 4088 4138 TEMPLATE_VBOXR0DRV_LDFLAGS += -IntegrityCheck 4089 4139 endif 4140 TEMPLATE_VBOXR0DRV_ORDERDEPS = $(VBOX_SIGN_DRIVER_ORDERDEPS) 4090 4141 TEMPLATE_VBOXR0DRV_POST_CMDS = $(VBOX_SIGN_DRIVER_CMDS) 4091 4142 endif
Note:
See TracChangeset
for help on using the changeset viewer.