Skip to content

Commit c6f976f

Browse files
committed
Move generic "...withRSA" handler after PSSwithRSA
1 parent 074400e commit c6f976f

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

crypto/src/security/SignerUtilities.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -517,14 +517,6 @@ public static ISigner GetSigner(
517517
{
518518
return (new RsaDigestSigner(new NullDigest(), (AlgorithmIdentifier)null));
519519
}
520-
521-
if (Platform.EndsWith(mechanism, "withRSA"))
522-
{
523-
string digestName = mechanism.Substring(0, mechanism.LastIndexOf("with"));
524-
IDigest digest = DigestUtilities.GetDigest(digestName);
525-
return new RsaDigestSigner(digest);
526-
}
527-
528520
if (mechanism.Equals("RAWRSASSA-PSS"))
529521
{
530522
// TODO Add support for other parameter settings
@@ -536,7 +528,12 @@ public static ISigner GetSigner(
536528
// to be used can be overridden by subsequent parameter settings.
537529
return (new PssSigner(new RsaBlindedEngine(), new Sha1Digest()));
538530
}
539-
531+
if (Platform.EndsWith(mechanism, "withRSA"))
532+
{
533+
string digestName = mechanism.Substring(0, mechanism.LastIndexOf("with"));
534+
IDigest digest = DigestUtilities.GetDigest(digestName);
535+
return new RsaDigestSigner(digest);
536+
}
540537
if (Platform.EndsWith(mechanism, "withRSAandMGF1"))
541538
{
542539
string digestName = mechanism.Substring(0, mechanism.LastIndexOf("with"));

0 commit comments

Comments
 (0)