joefitzgerald / packer-windows

Windows Packer Templates
MIT License
1.63k stars 1.12k forks source link

Replace expired vbox additions signing cert #229

Closed rjhornsby closed 6 years ago

nap commented 7 years ago

The certificate are already shipped with the VBoxGuestAdditions.iso: The oracle-cert.cer can be removed and the vs-guest-tools.bat can be modified with the following definition for the :virtualbox label.

:virtualbox
move /Y C:\Users\vagrant\VBoxGuestAdditions.iso C:\Windows\Temp
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
cmd /c C:\Windows\Temp\virtualbox\cert\VBoxCertUtil add-trusted-publisher C:\Windows\Temp\virtualbox\cert\vbox-sha1.cer --root C:\Windows\Temp\virtualbox\cert\vbox-sha1.cer
cmd /c C:\Windows\Temp\virtualbox\cert\VBoxCertUtil add-trusted-publisher C:\Windows\Temp\virtualbox\cert\vbox-sha256.cer --root C:\Windows\Temp\virtualbox\cert\vbox-sha256.cer
cmd /c C:\Windows\Temp\virtualbox\cert\VBoxCertUtil add-trusted-publisher C:\Windows\Temp\virtualbox\cert\vbox-sha256-r3.cer --root C:\Windows\Temp\virtualbox\cert\vbox-sha256-r3.cer
cmd /c C:\Windows\Temp\virtualbox\VBoxWindowsAdditions.exe /S
alinefr commented 6 years ago

I can confirm the fix works. It would be good to merge it.

DanielKinsman commented 6 years ago

Just ran into this problem as well, merging would be great.

StefanScherer commented 6 years ago

The PR #247 looks better as we do not have to update the certs every x years in this repo. I‘ll try to find some time to test in the nect days and merge a fix.

StefanScherer commented 6 years ago

Thanks. Fixed with #247 so we don't have to update the cert in this repo