MSM: Fix digital signing of output files

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2019-04-19 20:14:38 +02:00
parent a979361217
commit 532156de82

View File

@ -54,15 +54,14 @@
<PropertyGroup> <PropertyGroup>
<SigningCertificate Condition="$(SignMode)=='TestSign' And '$(TestCertificate)'!=''">$(TestCertificate)</SigningCertificate> <SigningCertificate Condition="$(SignMode)=='TestSign' And '$(TestCertificate)'!=''">$(TestCertificate)</SigningCertificate>
<SigningCertificate Condition="$(SignMode)=='ProductionSign' And '$(ProductionCertificate)'!=''">$(ProductionCertificate)</SigningCertificate> <SigningCertificate Condition="$(SignMode)=='ProductionSign' And '$(ProductionCertificate)'!=''">$(ProductionCertificate)</SigningCertificate>
<AfterBuildDependsOnTargets Condition="'$(SigningCertificate)'!='' And '$(TimeStampServer)'!=''">SignTarget</AfterBuildDependsOnTargets> <BuildDependsOn Condition="'$(SigningCertificate)'!='' And '$(TimeStampServer)'!=''">$(BuildDependsOn);SignTarget</BuildDependsOn>
<BuildDependsOn>$(BuildDependsOn);SignTarget</BuildDependsOn>
<CleanDependsOn>CleanSignTarget;$(CleanDependsOn)</CleanDependsOn> <CleanDependsOn>CleanSignTarget;$(CleanDependsOn)</CleanDependsOn>
</PropertyGroup> </PropertyGroup>
<Target <Target
Name="SignTarget" Name="SignTarget"
Inputs="$(TargetPath)" Inputs="$(TargetPath)"
Outputs="$(IntermediateOutputPath)$(TargetName).sign"> Outputs="$(IntermediateOutputPath)$(TargetName).sign">
<Exec Command="signtool.exe sign /sha1 &quot;$(SigningCertificate)&quot; /fd sha256 /tr &quot;$(TimeStampServer)&quot; /td sha256 /q &quot;$(TargetPath)&quot;" /> <Exec Command="signtool.exe sign /sha1 &quot;$(SigningCertificate)&quot; /fd sha256 /tr &quot;$(TimeStampServer)&quot; /td sha256 &quot;$(TargetPath)&quot;" />
<Touch Files="$(IntermediateOutputPath)$(TargetName).sign" AlwaysCreate="true"/> <Touch Files="$(IntermediateOutputPath)$(TargetName).sign" AlwaysCreate="true"/>
</Target> </Target>
<Target Name="CleanSignTarget"> <Target Name="CleanSignTarget">