diff options
author | David Hook <dgh@cryptoworkshop.com> | 2021-01-31 12:14:24 +1100 |
---|---|---|
committer | David Hook <dgh@cryptoworkshop.com> | 2021-01-31 12:14:24 +1100 |
commit | a080c4fd77feacdb7560879c7d0a75bd92e6209f (patch) | |
tree | 27233b768a144d6688f7c81e2e474f40f31b2763 /crypto/src | |
parent | donor update (diff) | |
download | BouncyCastle.NET-ed25519-a080c4fd77feacdb7560879c7d0a75bd92e6209f.tar.xz |
direct signature for PSS
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/cms/SignerInformation.cs | 10 |
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"); |