Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 38cc993

Browse files
hoyosjsmmitche
authored andcommitted
Use MicrosoftSHA2 for DAC signing (#27933)
* Use MicrosoftSHA2 for DAC signing * Fix DAC name
1 parent d36fefc commit 38cc993

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/sign.builds

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<PropertyGroup>
88
<!-- The SignFiles target needs OutDir to be defined -->
99
<OutDir>$(BinDir)</OutDir>
10+
<DebuggingCert>MicrosoftSHA2</DebuggingCert>
1011
</PropertyGroup>
1112

1213
<UsingTask AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" TaskName="ReadSigningRequired" />
@@ -35,9 +36,20 @@
3536
Managed assemblies should already have a requires_signing file dropped so only generate
3637
a requires_signing file for ones that don't exist which should leave just native assembies
3738
-->
39+
<ItemGroup>
40+
<!-- The DAC requires special signing for !analyze/watson to work properly. -->
41+
<SpecialDebuggingDlls Include="$(BinDir)$(CrossTargetComponentFolder)/mscordaccore*.dll" />
42+
<SpecialDebuggingDlls Include="$(BinDir)mscordaccore*.dll" />
43+
<WindowsNativeLocation Remove="@(SpecialDebuggingDlls)"/>
44+
</ItemGroup>
45+
3846
<WriteSigningRequired AuthenticodeSig="$(AuthenticodeSig)"
3947
MarkerFile="%(WindowsNativeLocation.Identity).requires_signing"
4048
Condition="!Exists('%(WindowsNativeLocation.Identity).requires_signing')" />
49+
50+
<WriteSigningRequired AuthenticodeSig="$(DebuggingCert)"
51+
MarkerFile="%(SpecialDebuggingDlls.Identity).requires_signing"
52+
Condition="!Exists('%(SpecialDebuggingDlls.Identity).requires_signing')" />
4153
</Target>
4254

4355
<!-- populates item group FilesToSign with the list of files to sign -->
@@ -63,4 +75,4 @@
6375
<Delete Files="@(SignMarkerFile)" />
6476
</Target>
6577

66-
</Project>
78+
</Project>

0 commit comments

Comments
 (0)