aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-08-28 09:23:19 +0200
committerSimon Rozman <simon@rozman.si>2019-09-02 10:59:57 +0200
commit459d8aa352f29ea8bf5b449cd6578641359aaa83 (patch)
treeb094aeef6a917a3f6efaed9fe38a8d1e91040c68
parentStop timestamping test-signed binaries (diff)
downloadwintun-459d8aa352f29ea8bf5b449cd6578641359aaa83.tar.xz
wintun-459d8aa352f29ea8bf5b449cd6578641359aaa83.zip
Append SHA1 signature to wintun.cat
Windows 7 install driver validation doesn't handle "Always trust" option in the "Untrusted publisher" dialog box for SHA-256-only signed drivers correctly (KB2921916). Signed-off-by: Simon Rozman <simon@rozman.si>
-rw-r--r--wintun.vcxproj18
1 files changed, 18 insertions, 0 deletions
diff --git a/wintun.vcxproj b/wintun.vcxproj
index 3bb61d1..7c5ae74 100644
--- a/wintun.vcxproj
+++ b/wintun.vcxproj
@@ -176,4 +176,22 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
+ <!-- TODO: Remove appending SHA-1 signature once Windows 7 support is discontinued. -->
+ <PropertyGroup>
+ <BuildDependsOn>$(BuildDependsOn);AppendWin7TestSignatureToCat;AppendWin7ProductionSignatureToCat</BuildDependsOn>
+ <CleanDependsOn>CleanAppendWin7SignatureToCat;$(CleanDependsOn)</CleanDependsOn>
+ </PropertyGroup>
+ <Target Name="AppendWin7TestSignatureToCat" AfterTargets="PackageTestSign" Condition="'$(SignMode)' == 'TestSign'"
+ Inputs="$(OutDir)$(ProjectName)\$(ProjectName).cat" Outputs="$(IntDir)$(TargetName).cat.sign">
+ <Exec Command="&quot;$(SignToolPath)&quot; sign /as /sha1 &quot;$(TestCertificate)&quot; /fd sha1 &quot;$(OutDir)$(ProjectName)\$(ProjectName).cat&quot;" />
+ <Touch Files="$(IntDir)$(TargetName).cat.sign" AlwaysCreate="true" />
+ </Target>
+ <Target Name="AppendWin7ProductionSignatureToCat" AfterTargets="PackageProductionSign" Condition="'$(SignMode)' == 'ProductionSign'"
+ Inputs="$(OutDir)$(ProjectName)\$(ProjectName).cat" Outputs="$(IntDir)$(TargetName).cat.sign">
+ <Exec Command="&quot;$(SignToolPath)&quot; sign /as /sha1 &quot;$(ProductionCertificate)&quot; /fd sha1 /tr &quot;$(TimeStampServer)&quot; /td sha1 &quot;$(OutDir)$(ProjectName)\$(ProjectName).cat&quot;" />
+ <Touch Files="$(IntDir)$(TargetName).cat.sign" AlwaysCreate="true" />
+ </Target>
+ <Target Name="CleanAppendWin7SignatureToCat">
+ <Delete Files="$(IntDir)$(TargetName).cat.sign" />
+ </Target>
</Project>