Signing.props 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <Project>
  2. <!-- See https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Signing.md for details. -->
  3. <ItemGroup>
  4. <!-- Reset Arcade's defaults. -->
  5. <ItemsToSign Remove="@(ItemsToSign)" />
  6. <StrongNameSignInfo Remove="@(StrongNameSignInfo)" />
  7. <FileExtensionSignInfo Remove="@(FileExtensionSignInfo)" />
  8. </ItemGroup>
  9. <ItemGroup Label="Signing config">
  10. <ItemsToSign Include="$(ArtifactsPackagesDir)**\*.nupkg" Exclude="$(ArtifactsPackagesDir)**\*symbols.nupkg" />
  11. <ItemsToSign Include="$(VisualStudioSetupOutputPath)**\*.vsix" />
  12. <ItemsToSign Include="$(ArtifactsPackagesDir)**\*.jar" />
  13. <ItemsToSign Include="$(ArtifactsDir)installers\$(Configuration)\**\*.zip" />
  14. <!--
  15. Map file extensions to a code-sign cert.
  16. "None" means don't sign the file itself, but still scan the contents for signable files.
  17. -->
  18. <FileExtensionSignInfo Include=".jar" CertificateName="MicrosoftJARSHA2" />
  19. <FileExtensionSignInfo Include=".ps1;.psd1;.psm1;.psc1" CertificateName="Microsoft400" />
  20. <FileExtensionSignInfo Include=".nupkg" CertificateName="NuGet" />
  21. <FileExtensionSignInfo Include=".vsix" CertificateName="VsixSHA2" />
  22. <FileExtensionSignInfo Include=".zip" CertificateName="None" />
  23. <FileExtensionSignInfo Include=".cab" CertificateName="None" />
  24. <FileExtensionSignInfo Include=".msi" CertificateName="None" />
  25. <!--
  26. Use the PublicKeyToken of .NET assemblies to determine with authenticode cert to use.
  27. 'None' is required to ensure code signing does not attempt to re-sign them or submit
  28. to ESPR for strong-naming signing. We don't delay sign, so we only need to authenticode sign.
  29. See https://github.com/dotnet/arcade/issues/1911 for context.
  30. -->
  31. <!-- The AspNetCore strong name. -->
  32. <StrongNameSignInfo Include="None" PublicKeyToken="adb9793829ddae60" CertificateName="Microsoft400" />
  33. <!-- The MsSharedLib72 strong name. -->
  34. <StrongNameSignInfo Include="None" PublicKeyToken="31bf3856ad364e35" CertificateName="Microsoft400" />
  35. <!-- The MsftStrongName strong name. -->
  36. <StrongNameSignInfo Include="None" PublicKeyToken="b03f5f7f11d50a3a" CertificateName="Microsoft400" />
  37. <!-- The MsftStrongName2 strong name. -->
  38. <StrongNameSignInfo Include="None" PublicKeyToken="b77a5c561934e089" CertificateName="Microsoft400" />
  39. <!-- The MsftOpenStrongName strong name. -->
  40. <StrongNameSignInfo Include="None" PublicKeyToken="cc7b13ffcd2ddd51" CertificateName="Microsoft400" />
  41. <!-- Native .dll's. These don't have a public key token, but are from Microsoft and should be signed. -->
  42. <FileSignInfo Include="aspnetcore.dll" CertificateName="Microsoft400" />
  43. <FileSignInfo Include="aspnetcorev2_inprocess.dll" CertificateName="Microsoft400" />
  44. <FileSignInfo Include="aspnetcorev2_outofprocess.dll" CertificateName="Microsoft400" />
  45. <FileSignInfo Include="aspnetcorev2.dll" CertificateName="Microsoft400" />
  46. <FileSignInfo Include="blazor-devserver.exe" CertificateName="Microsoft400" />
  47. <FileSignInfo Include="dotnet-dev-certs.exe" CertificateName="Microsoft400" />
  48. <FileSignInfo Include="dotnet-sql-cache.exe" CertificateName="Microsoft400" />
  49. <FileSignInfo Include="dotnet-user-secrets.exe" CertificateName="Microsoft400" />
  50. <FileSignInfo Include="dotnet-watch.exe" CertificateName="Microsoft400" />
  51. <FileSignInfo Include="Microsoft.AspNetCore.Blazor.Build.exe" CertificateName="Microsoft400" />
  52. <FileSignInfo Include="sni.dll" CertificateName="Microsoft400" />
  53. <!-- Third-party components which should be signed. -->
  54. <FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="3PartySHA2" />
  55. <FileSignInfo Include="AngleSharp.dll" CertificateName="3PartySHA2" />
  56. <FileSignInfo Include="Mono.Cecil.dll" CertificateName="3PartySHA2" />
  57. <FileSignInfo Include="Mono.Cecil.Mdb.dll" CertificateName="3PartySHA2" />
  58. <FileSignInfo Include="Mono.Cecil.Pdb.dll" CertificateName="3PartySHA2" />
  59. <FileSignInfo Include="Mono.Cecil.Rocks.dll" CertificateName="3PartySHA2" />
  60. </ItemGroup>
  61. <PropertyGroup>
  62. <TargetRuntimeIdentifier Condition="'$(TargetRuntimeIdentifier)' == ''">$(TargetOsName)-$(TargetArchitecture)</TargetRuntimeIdentifier>
  63. <BaseRedistNetCorePath>$(ArtifactsObjDir)RedistSharedFx.Layout\$(Configuration)\</BaseRedistNetCorePath>
  64. <RedistNetCorePath>$(BaseRedistNetCorePath)$(TargetRuntimeIdentifier)\</RedistNetCorePath>
  65. </PropertyGroup>
  66. <ItemGroup Label="Code sign exclusions">
  67. <!-- We don't need to code sign .js files because they are not used in Windows Script Host. -->
  68. <FileExtensionSignInfo Include=".js" CertificateName="None" />
  69. <!-- We don't produce font files. We rebundle some for using the web brower, so they do not need to be signed. -->
  70. <FileExtensionSignInfo Include=".otf" CertificateName="None" />
  71. <FileExtensionSignInfo Include=".ttf" CertificateName="None" />
  72. <!-- This is a text file which doesn't need to be code signed, even though some .mof files can be signed. -->
  73. <FileSignInfo Include="ancm.mof" CertificateName="None" />
  74. <!-- Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it. -->
  75. <FileSignInfo Include="apphost.exe" CertificateName="None" />
  76. <!--
  77. These files should already be signed by the .NET Core team. They have to be listed again here because we recreate a redistributable which includes the Microsoft.NETCore.App runtime.
  78. List all combinations of Windows RID's because CI may build multiple combinations of artitectures on the same machine.
  79. This uses globs because some of the file names change on every build of .NET Core, like sos_amd64_$(fileversion).dll.
  80. -->
  81. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x64\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" />
  82. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x86\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" />
  83. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" />
  84. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x64\host\**\*.dll" CertificateName="None" />
  85. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x86\host\**\*.dll" CertificateName="None" />
  86. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm\host\**\*.dll" CertificateName="None" />
  87. <_DotNetFilesToExclude Include="$(RedistNetCorePath)dotnet.exe" CertificateName="None" />
  88. <FileSignInfo Include="@(_DotNetFilesToExclude->'%(FileName)%(Extension)'->Distinct())" CertificateName="None" />
  89. </ItemGroup>
  90. </Project>