Skip to content

RSABCrypt: Improve errors with public key only - #100658

Merged
vcsjones merged 2 commits into
dotnet:mainfrom
vcsjones:rsabcrypt-pub
Apr 5, 2024
Merged

RSABCrypt: Improve errors with public key only#100658
vcsjones merged 2 commits into
dotnet:mainfrom
vcsjones:rsabcrypt-pub

Conversation

@vcsjones

@vcsjones vcsjones commented Apr 5, 2024

Copy link
Copy Markdown
Member

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

@ghost ghost added the area-System.Security label Apr 5, 2024
@dotnet-policy-service

Copy link
Copy Markdown
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 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
@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

dtivel commented Apr 16, 2024

Copy link
Copy Markdown

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

@vcsjones

Copy link
Copy Markdown
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
Copy Markdown
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.

3 participants