aspnetcore/eng
Matt Mitchell a0ab0964d4
[release/5.0] Fix some post-build signing issues (#26506)
* Fix some post-build signing issues
This fixes some post-build signing issues that are present in the aspnetcore repo
1. Add the .msi extension to be signed by Microsoft400 - Msis must be signed. With in-build signing these get handled explicitly by the wixproj infrastructure. When we do post build signing, we must sign these files.
2. Remove the strong name exclusions. These exclusions are incorrect when applied in post-build and unnecessary for in-build signing. Most importantly, the aspnetcore PKT would not end up re-strong named (it doesn't need to be strong name signed by ESRP since it's strong named in-build) because the PKT doesn't match any of the StrongNameSignInfo specified in arcade. The rest of the entries seem to be mostly about optimization. I could not find any performance difference between these entries being present and not. I am not sure whether they actually even apply to any assets. Moreover, when doing post-build signing, they would conflict with the entries in runtime and other places.

Verification - I have a tool that I wrote which unpacks every file between two directories and compares the strong name, nuget, and authenticode certs between equivalent files. This is the same tool being used to verify post-build signing. This tool shows no difference in any aspnetcore produced asset.

Baseline: https://dev.azure.com/dnceng/internal/_build/results?buildId=836183&view=results
Diff: https://dev.azure.com/dnceng/internal/_build/results?buildId=837176&view=results

* Do not push VS packages for installers when PostBuildSign == true

* Output wix command packages to the installers output path

* Don't import microbuild signing targets from wix when PostBuildSign=true

* Tweaks:
- Don't sign wixpacks when not in post-build signing
- Generate a wixpack for both the original msi name (which the wixproj generates) AND the name we use in the final outputs. This is because while these files are the same, signing differentiates the certificate based on the file name, and wixpack lookup is also based on the file names. Aspnetcore and other repos have uses the final outputs (e.g. dotnet-aspnetcore-runtime-123.5..) as well as the internal names (e.g. AspNetCoreSharedFramework_x64.msi).
- Don't sign msi's when not post-build signing.

* Avoid generating sha512 files for wixpack zips

* Don't run xplat code sign jobs if PostBuildSign == true

* Change original target names

* Conditionalize codesign operations

* Add publishing flag for linux x64 and add deb sha512 generation

* Do not push the x64 linux runtime archive more than once
2020-10-14 10:19:10 -07:00
..
common [release/5.0] Update dependencies from dotnet/arcade dotnet/runtime (#26694) 2020-10-08 16:57:59 +00:00
docker
helix Fix path data in FrameworkList.xml (#26622) 2020-10-09 11:06:15 -07:00
scripts Fix Helix testing issues with stable versions and local builds (#25865) 2020-09-13 21:45:23 -07:00
targets [release/5.0] Fix some post-build signing issues (#26506) 2020-10-14 10:19:10 -07:00
tools Fix path data in FrameworkList.xml (#26622) 2020-10-09 11:06:15 -07:00
AfterSigning.targets [release/5.0] Fix some post-build signing issues (#26506) 2020-10-14 10:19:10 -07:00
AfterSolutionBuild.targets
AllRulesDisabled.ruleset
Baseline.Designer.props [release/5.0] Correct baseline checks (#25227) 2020-08-28 09:53:20 -07:00
Baseline.xml Update Baseline.* files 2020-08-11 18:07:23 -07:00
Build.props Point to the correct directory for SDK test assets (#25734) 2020-09-10 11:55:37 -07:00
CodeGen.proj Keep `@(Reference)` metadata when creating `@(ProjectReference)` items (#21567) 2020-08-04 10:05:55 -07:00
Common.props
Dependencies.props Pin PackageOverrides.txt Extensions versions at Major.Minor.0 in servicing (#25986) 2020-09-17 21:02:46 -07:00
GenAPI.exclusions.txt
LicenseHeader.txt
PoliCheckExclusions.xml
ProjectReferences.props Remove Microsoft.Components.Web.Extensions (#26256) (#26298) 2020-09-25 12:14:56 -07:00
PublishSymbols.proj
Publishing.props [release/5.0] Fix some post-build signing issues (#26506) 2020-10-14 10:19:10 -07:00
QuarantinedTests.AfterArcade.props
QuarantinedTests.BeforeArcade.props
SharedFramework.External.props [release/5.0-rc2] Update dependencies from dotnet/arcade dotnet/runtime dotnet/efcore (#25555) 2020-09-08 23:34:53 +00:00
SharedFramework.Local.props
SignCheckExclusionsFile.txt
Signing.props [release/5.0] Fix some post-build signing issues (#26506) 2020-10-14 10:19:10 -07:00
Tools.props
Version.Details.xml [release/5.0] Update dependencies from dotnet/arcade (#26817) 2020-10-14 04:35:26 +00:00
Versions.props [release/5.0] Update dependencies from dotnet/arcade (#26817) 2020-10-14 04:35:26 +00:00
Workarounds.props
Workarounds.targets Use `$(TargetFrameworkIdentifier)` and `$(TargetFrameworkVersion)` consistently (#25428) 2020-08-31 11:36:19 -07:00
WorkaroundsImported.targets
configure-toolset.ps1
configure-toolset.sh
empty.proj
sdl-tsa-vars.config Update path after dupe fix 2020-08-05 10:26:39 -07:00