From a080c4fd77feacdb7560879c7d0a75bd92e6209f Mon Sep 17 00:00:00 2001 From: David Hook Date: Sun, 31 Jan 2021 12:14:24 +1100 Subject: direct signature for PSS --- crypto/src/cms/SignerInformation.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crypto/src') 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"); -- cgit 1.5.1