summary refs log tree commit diff
path: root/crypto/src/cms
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2021-01-31 12:14:24 +1100
committerDavid Hook <dgh@cryptoworkshop.com>2021-01-31 12:14:24 +1100
commita080c4fd77feacdb7560879c7d0a75bd92e6209f (patch)
tree27233b768a144d6688f7c81e2e474f40f31b2763 /crypto/src/cms
parentdonor update (diff)
downloadBouncyCastle.NET-ed25519-a080c4fd77feacdb7560879c7d0a75bd92e6209f.tar.xz
direct signature for PSS
Diffstat (limited to 'crypto/src/cms')
-rw-r--r--crypto/src/cms/SignerInformation.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/src/cms/SignerInformation.cs b/crypto/src/cms/SignerInformation.cs
index ea9330db1..e8988902b 100644
--- a/crypto/src/cms/SignerInformation.cs
+++ b/crypto/src/cms/SignerInformation.cs
@@ -578,6 +578,16 @@ namespace Org.BouncyCastle.Cms
 
 					return Arrays.ConstantTimeAreEqual(digest, sigHash);
 				}
+				else if (algorithm.Equals("RSAandMGF1"))
+				{
+					ISigner sig = SignerUtilities.GetSigner("NONEWITHRSAPSS");
+
+					sig.Init(false, key);
+
+					sig.BlockUpdate(digest, 0, digest.Length);
+
+					return sig.VerifySignature(signature);
+				}
 				else if (algorithm.Equals("DSA"))
 				{
 					ISigner sig = SignerUtilities.GetSigner("NONEwithDSA");