-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build strong named assemblies #11
base: main
Are you sure you want to change the base?
Conversation
@AArnott I asked AI and it says it's generally not a good idea to store .snk files publicly. Should these be stored in Azure or something instead?
|
The AI response is based on very old guidance. If for historical reasons you want to maintain a perception with your users that only you can build assemblies with your strong name (e.g. as the .NET Framework itself still does), an author may choose to retain the private key for their strong name as a secret. But generally it's not treated that way any more. Microsoft's official stance on strong naming points users to Authenticode signing for verifiability of authorship or source of a binary. Strong naming only serves two purposes nowadays:
Both of the above apply to .NET Framework. However strong naming means nothing by default on .NET, whether you do it or not. Then there's the open source angle: since .NET Framework does care about strong naming, if you don't disclose the private key you use for strong naming, others cannot in fact fork, build and replace your dll in their application because they will not be able to reproduce a strong named and signed dll that you built. So in the spirit of open source, when strong naming the private key should be disclosed with the code. The AI response is appropriate treatment for an authenticode private key, to be sure. But strong name private keys aren't for privacy or security at all (as Microsoft's guidance now states), but rather just a necessity for historical reasons in order to strong name sign, and thus are not harmed at all by being made public. |
This supports thomhurst/TUnit#1467
Note that for .NET Framework users, adding a strong name is a binary breaking change. This means an application will fail if it has a mix of
Sourcy
users where some assemblies were compiled against the strong named version and some were not. I wonder if you want to rev the version number in a particular way to reflect this.