diff options
Diffstat (limited to 'crypto/test/src/cms')
-rw-r--r-- | crypto/test/src/cms/test/SignedDataStreamTest.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crypto/test/src/cms/test/SignedDataStreamTest.cs b/crypto/test/src/cms/test/SignedDataStreamTest.cs index 29b0db8f4..96f3f125d 100644 --- a/crypto/test/src/cms/test/SignedDataStreamTest.cs +++ b/crypto/test/src/cms/test/SignedDataStreamTest.cs @@ -1211,5 +1211,25 @@ namespace Org.BouncyCastle.Cms.Tests Assert.AreEqual(SignCert, a[0]); Assert.AreEqual(OrigCert, a[1]); } + + [Test] + public void TestCertsOnly() + { + IList certList = new ArrayList(); + certList.Add(OrigCert); + certList.Add(SignCert); + + IX509Store x509Certs = X509StoreFactory.Create( + "Certificate/Collection", + new X509CollectionStoreParameters(certList)); + + MemoryStream bOut = new MemoryStream(); + + CmsSignedDataStreamGenerator gen = new CmsSignedDataStreamGenerator(); + gen.AddCertificates(x509Certs); + gen.Open(bOut).Close(); + + CheckSigParseable(bOut.ToArray()); + } } } |