aspnetcore/eng/targets
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
..
CSharp.Common.props [5.0.0-rc2] Backport Fix chrome/selenium tests (#25330) (#25840) 2020-09-14 18:43:42 -07:00
CSharp.Common.targets !!! Correct condition controlling `public` API analysis !!! (#26797) 2020-10-12 11:07:18 -07:00
Cpp.Common.props
Cpp.Common.targets [release/5.0] Fix some post-build signing issues (#26506) 2020-10-14 10:19:10 -07:00
FSharp.Common.targets
FunctionalTestAsset.targets
FunctionalTestWithAssets.targets
GetRazorSDKDirectory.props
Helix.Common.props Remove dead-lettered Centos.7.Amd64.Open queue (#26238) 2020-09-24 12:14:15 -07:00
Helix.props Do not use `$(AppRuntimeVersion)` or NETCore version for shared Fx in Helix runs (#25477) 2020-08-31 21:40:02 -07:00
Helix.targets Fix Helix testing issues with stable versions and local builds (#25865) 2020-09-13 21:45:23 -07:00
Java.Common.props Add incremental build and project references to java projects (#25707) 2020-09-08 16:30:18 -07:00
Java.Common.targets Add incremental build and project references to java projects (#25707) 2020-09-08 16:30:18 -07:00
MicroBuild.Plugin.props
Npm.Common.props
Npm.Common.targets
Packaging.targets Allow BaselineGenerator to build after updating version (#26252) 2020-09-24 16:37:54 -07:00
ResolveIisReferences.targets
ResolveReferences.targets Almost-always use project references, not baseline references (#25992) 2020-09-18 10:33:01 -07:00
Wix.Common.props Enable ARM64 installers build. (#25579) 2020-09-10 10:59:37 -07:00
Wix.Common.targets [release/5.0] Fix some post-build signing issues (#26506) 2020-10-14 10:19:10 -07:00