summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2018-10-14 19:50:46 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2018-10-14 19:50:46 +0700
commitc6f976fb582940b476e60463a6a0e9b9fdb71fb0 (patch)
tree10f03f989c1118ba718e260c1cda8da5d2a84d73 /crypto
parentHandle CVC-ECDSA and PLAIN-ECDSA in test case (diff)
downloadBouncyCastle.NET-ed25519-c6f976fb582940b476e60463a6a0e9b9fdb71fb0.tar.xz
Move generic "...withRSA" handler after PSSwithRSA
Diffstat (limited to 'crypto')
-rw-r--r--crypto/src/security/SignerUtilities.cs15
1 files changed, 6 insertions, 9 deletions
diff --git a/crypto/src/security/SignerUtilities.cs b/crypto/src/security/SignerUtilities.cs
index dc31ae464..ae8d21f0a 100644
--- a/crypto/src/security/SignerUtilities.cs
+++ b/crypto/src/security/SignerUtilities.cs
@@ -517,14 +517,6 @@ namespace Org.BouncyCastle.Security
             {
                 return (new RsaDigestSigner(new NullDigest(), (AlgorithmIdentifier)null));
             }
-
-            if (Platform.EndsWith(mechanism, "withRSA"))
-            {
-                string digestName = mechanism.Substring(0, mechanism.LastIndexOf("with"));
-                IDigest digest = DigestUtilities.GetDigest(digestName);
-                return new RsaDigestSigner(digest);
-            }
-
             if (mechanism.Equals("RAWRSASSA-PSS"))
             {
                 // TODO Add support for other parameter settings
@@ -536,7 +528,12 @@ namespace Org.BouncyCastle.Security
                 // to be used can be overridden by subsequent parameter settings.
                 return (new PssSigner(new RsaBlindedEngine(), new Sha1Digest()));
             }
-
+            if (Platform.EndsWith(mechanism, "withRSA"))
+            {
+                string digestName = mechanism.Substring(0, mechanism.LastIndexOf("with"));
+                IDigest digest = DigestUtilities.GetDigest(digestName);
+                return new RsaDigestSigner(digest);
+            }
             if (Platform.EndsWith(mechanism, "withRSAandMGF1"))
             {
                 string digestName = mechanism.Substring(0, mechanism.LastIndexOf("with"));