diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/test/src/cms/test/SignedDataTest.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crypto/test/src/cms/test/SignedDataTest.cs b/crypto/test/src/cms/test/SignedDataTest.cs index 78a5015b2..78d472400 100644 --- a/crypto/test/src/cms/test/SignedDataTest.cs +++ b/crypto/test/src/cms/test/SignedDataTest.cs @@ -1493,6 +1493,26 @@ namespace Org.BouncyCastle.Cms.Tests VerifySignatures(sig); } + [Test] + public void TestMsPkcs7() + { + var data = GetInput("Pkcs7SignedContent.p7b"); + var sData = new CmsSignedData(data); + + var certStore = sData.GetCertificates(); + var signers = sData.GetSignerInfos(); + var c = signers.GetSigners(); + + foreach (var signer in c) + { + var certCollection = certStore.EnumerateMatches(signer.SignerID); + foreach (var cert in certCollection) + { + signer.Verify(cert); + } + } + } + private static void DoTestSample(string sigName) { CmsSignedData sig = new CmsSignedData(GetInput(sigName)); |