-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
RSABCrypt: Improve errors with public key only #100658
Conversation
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSABCrypt.cs
Show resolved
Hide resolved
@dtivel I can't speak for backporting or not, but I opened NuGet/Home#13375 separately from this as a proposal for how NuGet can better handle this scenario. Even with this change, nuget users are going to get exceptions. |
It makes some errors more clear, but doesn't change the overall execution flow, so I don't think it would meet an LTS servicing bar. There'd have to be a clear improvement from it. |
When RSABcrypt attempted to do a private operation when only possessing a public key, a CryptographicException with the message "Unknown error (0xc100000d)" was thrown. This PR changes it to throw a more helpful error when a private key is missing.
Fixes #100414