PublicSign does not work when supplied with a full private key #17451
Labels
Area-ProjectsAndBuild
MSBuild tasks, project files, framework resolution
Bug
Impact-Low
(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
The
--publicsign+
(OrPublicSign
project property) option used for public-signing projects does not work when the supplied strong name key is a full public/private key pair.Steps to reproduce.
Generate a strong name key pair (
sn -k mykeypair.snk
)Create a project that looks like this
Attempt to build this project will result in
Note that public does work correctly if you supply it with just the public key.
sn -p mypairpair.snk publickey.snk
AssemblyOriginatorKeyFile
topublickey.snk
In theory public signing, even with the full public/private key pair should still work because the public key is a a subset of the private key.
The C# / Roslyn toolset is able to use the full private key when used with
publicsign
As for the use case of why this is useful, this was reported by Red Hat / @omajid. They are trying to utilize
PublicSign
in their build process because full-signing does not work. Full signing does not work there because strong naming requires using the RSA+SHA1 signature algorithm, and that signature algorithm does not work on their systems because it is deprecated.More background on the issue is available at dotnet/runtime#105486
The text was updated successfully, but these errors were encountered: