Skip to content
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

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

vcsjones
Copy link
Member

@vcsjones vcsjones commented Apr 5, 2024

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

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@vcsjones vcsjones changed the title RSABCrypt: Fix operations with public key only RSABCrypt: Improve errors with public key only Apr 5, 2024
@vcsjones vcsjones marked this pull request as ready for review April 5, 2024 14:45
@vcsjones vcsjones merged commit 068ba8e into dotnet:main Apr 5, 2024
84 of 87 checks passed
@vcsjones vcsjones deleted the rsabcrypt-pub branch April 5, 2024 15:49
@vcsjones vcsjones added this to the 9.0.0 milestone Apr 5, 2024
@dtivel
Copy link

dtivel commented Apr 16, 2024

@vcsjones, @bartonjs, will this change be backported to 8.0?

@vcsjones
Copy link
Member Author

@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.

@bartonjs
Copy link
Member

will this change be backported to 8.0?

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.

@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dotnet nuget sign error: Unknown error (0xc100000d)
3 participants