Changeset 64927 in vbox
- Timestamp:
- Dec 16, 2016 9:43:42 PM (8 years ago)
- Location:
- trunk/src/VBox/Installer/win/Stub
- Files:
-
- 2 edited
-
Makefile.kmk (modified) (1 diff)
-
VBoxStub.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/win/Stub/Makefile.kmk
r62487 r64927 56 56 VBoxStub.cpp_DEFS += VBOX_WITH_CODE_SIGNING 57 57 58 $$(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h: $(VBOX_BIN2C) $(PATH_ROOT)/src/VBox/Additions/WINNT/tools/oracle-vbox.cer | $$(dir $$@) 59 $(VBOX_BIN2C) _VBoxStubPublicCert $(PATH_ROOT)/src/VBox/Additions/WINNT/tools/oracle-vbox.cer $@ 58 $$(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h: | $$(dir $$@) $(VBOX_RTSIGNTOOL) $(PATH_STAGE_SYS)/VBoxDrv.sys 59 $(RM) -f -- "$@" "$@.cer0" "$@.cer1" "$@.cer2" "$@.array" 60 61 $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --signature-index 0 --exe "$(PATH_STAGE_SYS)/VBoxDrv.sys" --output "$@.cer0" --der 62 $(VBOX_BIN2C) -ascii --append VBoxStubTrustedCert0 "$@.cer0" $@ 63 $(APPEND) "$@.array" " { g_abVBoxStubTrustedCert0, sizeof(g_abVBoxStubTrustedCert0) }, " 64 if defined(VBOX_CERTIFICATE_SHA2_SUBJECT_NAME) && (!defined(VBOX_WITH_CORP_CODE_SIGNING) || "$(VBOX_WITH_CORP_CODE_SIGNING)" != "all") 65 $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --signature-index 1 --exe "$(PATH_STAGE_SYS)/VBoxDrv.sys" --output "$@.cer1" --der 66 $(VBOX_BIN2C) -ascii --append VBoxStubTrustedCert1 "$@.cer1" $@ 67 $(APPEND) "$@.array" " { g_abVBoxStubTrustedCert1, sizeof(g_abVBoxStubTrustedCert1) }, " 68 endif 69 if defined(VBOX_WITH_CORP_CODE_SIGNING) && "$(VBOX_WITH_CORP_CODE_SIGNING)" != "all" && "$(VBOX_SIGNING_MODE)" == "release" 70 $(VBOX_RTSIGNTOOL) extract-exe-signer-cert --signature-index 1 --exe "" --output "$@.cer2" --der 71 $(VBOX_BIN2C) -ascii --append VBoxStubTrustedCert1 "$@.cer2" $@ 72 $(APPEND) "$@.array" " { g_abVBoxStubTrustedCert2, sizeof(g_abVBoxStubTrustedCert2) }, " 73 endif 74 $(APPEND) -n "$@" \ 75 "" \ 76 "struct { uint8_t const *pab; uint32_t cb; }" "g_aVBoxStubTrustedCerts[] = " \ 77 "{" 78 $(SED) --append "$@" -e "" "$@.array" 79 $(APPEND) -n "$@" \ 80 "};" 81 $(RM) -f -- "$@.cer0" "$@.cer1" "$@.cer2" "$@.array" 82 83 VBoxStubPublicCert.h:: $$(VBoxStub_0_OUTDIR)/VBoxStubPublicCert.h 60 84 61 85 endif -
trunk/src/VBox/Installer/win/Stub/VBoxStub.cpp
r63311 r64927 698 698 * @returns Fully complained exit code. 699 699 */ 700 static RTEXITCODE InstallCertificate(void) 701 { 702 if (addCertToStore(CERT_SYSTEM_STORE_LOCAL_MACHINE, 703 "TrustedPublisher", 704 g_ab_VBoxStubPublicCert, 705 sizeof(g_ab_VBoxStubPublicCert))) 706 return RTEXITCODE_SUCCESS; 707 return ShowError("Failed to construct install certificate."); 700 static RTEXITCODE InstallCertificates(void) 701 { 702 for (uint32_t i = 0; i < RT_ELEMENTS(g_aVBoxStubTrustedCerts); i++) 703 { 704 if (!addCertToStore(CERT_SYSTEM_STORE_LOCAL_MACHINE, 705 "TrustedPublisher", 706 g_aVBoxStubTrustedCerts[i].pab, 707 g_aVBoxStubTrustedCerts[i].cb)) 708 return ShowError("Failed to construct install certificate."); 709 } 710 return RTEXITCODE_SUCCESS; 708 711 } 709 712 #endif /* VBOX_WITH_CODE_SIGNING */ … … 1133 1136 { 1134 1137 rcExit = CopyCustomDir(szExtractPath); 1135 #ifdef VBOX_WITH_CODE_SIGNING1138 #ifdef VBOX_WITH_CODE_SIGNING 1136 1139 if (rcExit == RTEXITCODE_SUCCESS && fEnableSilentCert && g_fSilent) 1137 rcExit = InstallCertificate ();1138 #endif1140 rcExit = InstallCertificates(); 1141 #endif 1139 1142 unsigned iPackage = 0; 1140 1143 while ( iPackage < pHeader->byCntPkgs
Note:
See TracChangeset
for help on using the changeset viewer.

