windows: re-enable TestWinVerifyTrust with newly signed file

Rather than disabling this test, let's just not make it rely on
Microsoft files, whose signing validity period we can't depend on.
Instead, we include our own EV-signed artifact, with a Digicert
timestamp using a certificate valid for a decade.

Fixes golang/go#49651.
Fixes golang/go#49266.
For golang/go#46906.

Change-Id: Idadba346810017b8f769d6fac1ddd357d4dee93c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/366655
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Jason A. Donenfeld
2021-11-23 17:31:58 +00:00
parent dee7805ff2
commit ef496fb156
3 changed files with 36 additions and 21 deletions
+21
View File
@@ -0,0 +1,21 @@
This folder contains various pre-generated artifacts for testing. Descriptions
of each follow below.
## ev-signed-file.exe
This was generated with:
int main(void)
{
puts("Hello Gophers!");
return 0;
}
And then a simple clang/mingw compilation:
i686-w64-mingw32-gcc -Os -s a.c
After, it was copied to a Windows computer where it was signed with an EV
certificate using:
signtool sign /sha1 <ID of certificate> /fd sha256 /tr http://timestamp.digicert.com /td sha256 /d "Go Project EV Signing Test" a.exe
Binary file not shown.