Fix #6987 - Strongname signature size#10108
Merged
cartermp merged 1 commit intodotnet:mainfrom Sep 14, 2020
Merged
Conversation
040824a to
d3b2d9f
Compare
cartermp
approved these changes
Sep 14, 2020
KevinRansom
added a commit
that referenced
this pull request
Sep 14, 2020
* Bloody mutable fields (#10116) * Fix 9150 --- #i nuget on desktop witout net48 ref assemblies fails. (#10114) * signing (#10108) Co-authored-by: Kevin Ransom (msft) <[email protected]>
nosami
pushed a commit
to xamarin/visualfsharp
that referenced
this pull request
Feb 23, 2021
nosami
pushed a commit
to xamarin/visualfsharp
that referenced
this pull request
Feb 23, 2021
* Bloody mutable fields (dotnet#10116) * Fix 9150 --- #i nuget on desktop witout net48 ref assemblies fails. (dotnet#10114) * signing (dotnet#10108) Co-authored-by: Kevin Ransom (msft) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #6987
The issue is that the desktop compiler uses The deprecated mscoree api: ICLRStrongName to do strongname signing. There is a permissions issue with
C:\ProgramData\Microsoft\Crypto\RSA\MachineKeysthat shows up from time to time. Once it does signing with a non admin user stops working.Here is a page describing how to fix the permissions: https://docs.microsoft.com/en-us/troubleshoot/windows-server/windows-security/default-permissions-machinekeys-folders
The section on Permissions for the everyone group is the relevant section.
This PR fixes the issue, by using the signing code we wrote for the coreclr on the desktop as well. We retain the use of ICoreClrStrongName, only on the desktop compiler for the key container scenario.
Whilst doing this I also took the opportunity to refactor the code into ilsign.fsi/ilsign.fs, so now the signing code is in one place.
Enjoy
Kevin