Enable signing Windows builds with SHA1 environment variable (GH-11279)

This commit is contained in:
Steve Dower 2018-12-21 13:48:18 -08:00 committed by GitHub
parent f0af4c54e3
commit d3bbc52413
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -21,6 +21,9 @@ function Sign-File {
$description = "Python";
}
}
if (-not $certsha1) {
$certsha1 = $env:SigningCertificateSha1;
}
if (-not $certname) {
$certname = $env:SigningCertificate;
}
@ -32,7 +35,7 @@ function Sign-File {
if ($certsha1) {
SignTool sign /sha1 $certsha1 /fd sha256 /t http://timestamp.verisign.com/scripts/timestamp.dll /d $description $a
} elseif ($certname) {
SignTool sign /n $certname /fd sha256 /t http://timestamp.verisign.com/scripts/timestamp.dll /d $description $a
SignTool sign /a /n $certname /fd sha256 /t http://timestamp.verisign.com/scripts/timestamp.dll /d $description $a
} elseif ($certfile) {
SignTool sign /f $certfile /fd sha256 /t http://timestamp.verisign.com/scripts/timestamp.dll /d $description $a
} else {