summaryrefslogtreecommitdiff
path: root/PCbuild
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-12-21 14:04:18 -0800
committerGitHub <noreply@github.com>2018-12-21 14:04:18 -0800
commitdd3b04ea8ce29d6bce4daca1fc38aaba73d94ab7 (patch)
treeed1012d09f3567c337ca84cf005dbfbfc7c337a5 /PCbuild
parentaa7922ae794c0e1e261d2bb450bb6cedc46d305a (diff)
downloadcpython-git-dd3b04ea8ce29d6bce4daca1fc38aaba73d94ab7.tar.gz
Enable signing Windows builds with SHA1 environment variable (GH-11279)
(cherry picked from commit d3bbc5241363d5fa4e749fe509c97c12501ae966) Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/pyproject.props5
1 files changed, 3 insertions, 2 deletions
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
index 6d36977456..2019ca859c 100644
--- a/PCbuild/pyproject.props
+++ b/PCbuild/pyproject.props
@@ -185,10 +185,11 @@ public override bool Execute() {
<SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot)\bin\x86</SdkBinPath>
<SdkBinPath Condition="!Exists($(SdkBinPath))">$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A@InstallationFolder)\Bin\</SdkBinPath>
<_SignCommand Condition="Exists($(SdkBinPath)) and '$(SigningCertificate)' != '' and $(SupportSigning)">"$(SdkBinPath)\signtool.exe" sign /q /a /n "$(SigningCertificate)" /fd sha256 /t http://timestamp.verisign.com/scripts/timestamp.dll /d "Python $(PythonVersion)"</_SignCommand>
+ <_SignCommand Condition="Exists($(SdkBinPath)) and '$(SigningCertificateSha1)' != '' and $(SupportSigning)">"$(SdkBinPath)\signtool.exe" sign /q /a /sha1 "$(SigningCertificateSha1)" /fd sha256 /t http://timestamp.verisign.com/scripts/timestamp.dll /d "Python $(PythonVersion)"</_SignCommand>
<_MakeCatCommand Condition="Exists($(SdkBinPath))">"$(SdkBinPath)\makecat.exe"</_MakeCatCommand>
</PropertyGroup>
-
- <Target Name="_SignBuild" AfterTargets="AfterBuild" Condition="'$(SigningCertificate)' != '' and $(SupportSigning)">
+
+ <Target Name="_SignBuild" AfterTargets="AfterBuild" Condition="'$(_SignCommand)' != '' and $(SupportSigning)">
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
<Exec Command='$(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)"' ContinueOnError="false" />
</Target>