Signing.props 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <Project>
  2. <!-- See https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Signing.md for details. -->
  3. <Import Project="Common.props" />
  4. <PropertyGroup>
  5. <!-- Use the dotnet certificate for any remaining defaults (e.g. StrongNameSignInfo) -->
  6. <UseDotNetCertificate>true</UseDotNetCertificate>
  7. </PropertyGroup>
  8. <ItemGroup Label="File signing information">
  9. <!-- Third-party components which should be signed. -->
  10. <FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="3PartySHA2" />
  11. <FileSignInfo Include="AngleSharp.dll" CertificateName="3PartySHA2" />
  12. <FileSignInfo Include="Mono.Cecil.dll" CertificateName="3PartySHA2" />
  13. <FileSignInfo Include="Mono.Cecil.Mdb.dll" CertificateName="3PartySHA2" />
  14. <FileSignInfo Include="Mono.Cecil.Pdb.dll" CertificateName="3PartySHA2" />
  15. <FileSignInfo Include="Mono.Cecil.Rocks.dll" CertificateName="3PartySHA2" />
  16. </ItemGroup>
  17. <PropertyGroup>
  18. <BaseRedistNetCorePath>$(ArtifactsObjDir)RedistSharedFx.Layout\$(Configuration)\</BaseRedistNetCorePath>
  19. <RedistNetCorePath>$(BaseRedistNetCorePath)$(TargetRuntimeIdentifier)\</RedistNetCorePath>
  20. </PropertyGroup>
  21. <ItemGroup Label="Code sign exclusions">
  22. <!-- We don't produce font files. We rebundle some for using the web browser, so they do not need to be signed. -->
  23. <FileExtensionSignInfo Update=".otf" CertificateName="None" />
  24. <FileExtensionSignInfo Update=".ttf" CertificateName="None" />
  25. <!-- This is a text file which doesn't need to be code signed, even though some .mof files can be signed. -->
  26. <FileSignInfo Include="ancm.mof" CertificateName="None" />
  27. <!-- Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it. -->
  28. <FileSignInfo Include="apphost.exe" CertificateName="None" />
  29. <!--
  30. 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.
  31. List all combinations of Windows RID's because CI may build multiple combinations of artitectures on the same machine.
  32. This uses globs because some of the file names change on every build of .NET Core, like sos_amd64_$(fileversion).dll.
  33. Technically, this may not be necessary. SignTool does a good deal of detection to determine
  34. whether files are already signed.
  35. Do not include these with cert "None" when doing post-build signing. In that case, we will recognize that
  36. -->
  37. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x64\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" />
  38. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x86\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" />
  39. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" />
  40. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm64\shared\Microsoft.NETCore.App\**\*.dll" CertificateName="None" />
  41. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x64\host\**\*.dll" CertificateName="None" />
  42. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-x86\host\**\*.dll" CertificateName="None" />
  43. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm\host\**\*.dll" CertificateName="None" />
  44. <_DotNetFilesToExclude Include="$(BaseRedistNetCorePath)win-arm64\host\**\*.dll" CertificateName="None" />
  45. <_DotNetFilesToExclude Include="$(RedistNetCorePath)dotnet.exe" CertificateName="None" />
  46. <FileSignInfo Include="@(_DotNetFilesToExclude->'%(FileName)%(Extension)'->Distinct())" CertificateName="None" Condition="'$(PostBuildSign)' != 'true'" />
  47. <!-- Symbol packages should get no NuGet signature -->
  48. <!-- Requires https://github.com/dotnet/arcade/issues/6192 to be fixed -->
  49. <!-- <FileSignInfo Include="@(_SymbolPackages->'%(FileName)%(Extension)'->Distinct())" CertificateName="None" /> -->
  50. <!--
  51. We include the Microsoft.Build.Locator.dll assembly in our global tool 'Microsoft.dotnet-openapi'.
  52. It is already signed by that team, so we don't need to sign it.
  53. -->
  54. <FileSignInfo Include="Microsoft.Build.Locator.dll" CertificateName="None" />
  55. <!--
  56. We include the Microsoft.Data.SqlClient.dll and Microsoft.Identity.Client.dll assembly in our global tool 'dotnet-sql-cache'.
  57. It is already signed by that team, so we don't need to sign it.
  58. -->
  59. <FileSignInfo Include="Microsoft.Data.SqlClient.dll" CertificateName="None" />
  60. <FileSignInfo Include="Microsoft.Identity.Client.dll" CertificateName="None" />
  61. </ItemGroup>
  62. <!-- $(InstallersOutputPath), $(SymbolsOutputPath), and $(ChecksumExtensions) are not defined. Root Directory.Build.props is not imported. -->
  63. <ItemGroup>
  64. <!-- Prepare for _PublishInstallersAndChecksums target. -->
  65. <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.jar" UploadPathSegment="jar/" ChecksumPath="%(FullPath).sha512" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
  66. <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.pom" UploadPathSegment="jar/" ChecksumPath="%(FullPath).sha512" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
  67. <!-- All builds produce npm assets - only publish them once -->
  68. <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tgz" UploadPathSegment="npm/" ChecksumPath="%(FullPath).sha512" Condition="'$(PublishAllBuildsAssetsInThisJob)' == 'true'" />
  69. <_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.version" UploadPathSegment="Runtime/" Condition="'$(PublishInstallerBaseVersion)' == 'true'" />
  70. <!-- The following installers create checksums -->
  71. <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.deb" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
  72. <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.rpm" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
  73. <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.tar.gz" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
  74. <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
  75. <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
  76. <_InstallersToPublish Include="$(ArtifactsPackagesDir)**\*.zip" UploadPathSegment="Runtime/" >
  77. <ChecksumPath Condition="$([System.String]::Copy('%(Filename)%(Extension)').EndsWith('.wixpack.zip')) != 'true'">%(FullPath).sha512</ChecksumPath>
  78. </_InstallersToPublish>
  79. <_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.exe" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
  80. <_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.msi" UploadPathSegment="Runtime/" ChecksumPath="%(FullPath).sha512" />
  81. <_InstallersToPublish Include="$(ArtifactsDir)installers\$(Configuration)\**\*.zip" UploadPathSegment="Runtime/" >
  82. <ChecksumPath Condition="$([System.String]::Copy('%(Filename)%(Extension)').EndsWith('.wixpack.zip')) != 'true'">%(FullPath).sha512</ChecksumPath>
  83. </_InstallersToPublish>
  84. <Artifact Include="@(_InstallersToPublish)" Kind="Blob">
  85. <IsShipping>true</IsShipping>
  86. <IsShipping Condition="$([System.String]::Copy('%(RecursiveDir)').StartsWith('NonShipping'))">false</IsShipping>
  87. <IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('wixpack.zip'))">false</IsShipping>
  88. </Artifact>
  89. </ItemGroup>
  90. </Project>