diff options
author | Steve Dower <steve.dower@microsoft.com> | 2018-12-21 21:48:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-21 21:48:18 (GMT) |
commit | d3bbc5241363d5fa4e749fe509c97c12501ae966 (patch) | |
tree | 1dc4f8616fdf20d98269baa7922a7621ef4fc093 /PCbuild | |
parent | f0af4c54e32d963e1ccbac005bcbcab1913e051f (diff) | |
download | cpython-d3bbc5241363d5fa4e749fe509c97c12501ae966.zip cpython-d3bbc5241363d5fa4e749fe509c97c12501ae966.tar.gz cpython-d3bbc5241363d5fa4e749fe509c97c12501ae966.tar.bz2 |
Enable signing Windows builds with SHA1 environment variable (GH-11279)
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/pyproject.props | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index cf85e1b..b058016 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -187,10 +187,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> |