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

Fix padding mode precondition in RSAAndroid #57695

Merged
merged 1 commit into from
Aug 19, 2021

Conversation

bartonjs
Copy link
Member

@bartonjs bartonjs commented Aug 18, 2021

Fixes #57683.

@ghost
Copy link

ghost commented Aug 18, 2021

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: bartonjs
Assignees: -
Labels:

area-System.Security

Milestone: -

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny.

@stephentoub stephentoub merged commit 8444429 into dotnet:main Aug 19, 2021
@@ -825,7 +825,7 @@ public override bool VerifyHash(ReadOnlySpan<byte> hash, ReadOnlySpan<byte> sign
{
throw new ArgumentNullException(nameof(padding));
}
if (padding == RSASignaturePadding.Pkcs1 && padding == RSASignaturePadding.Pss)
if (padding != RSASignaturePadding.Pkcs1 && padding != RSASignaturePadding.Pss)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we have tests for this and they're just not yet running on Android? (Or maybe we're scouting them and that's how we found this?)

@bartonjs bartonjs deleted the rsa_android_cleanup branch August 20, 2021 17:13
@ghost ghost locked as resolved and limited conversation to collaborators Sep 19, 2021
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.

Impossible signature padding conditions in RSAAndroid
4 participants