summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorAlexander Scheel <alexander.scheel@keyfactor.com>2024-02-12 09:44:54 -0500
committerAlexander Scheel <alexander.scheel@keyfactor.com>2024-02-12 11:08:13 -0500
commit62486175817538acb3620f213c1d72e020774ec4 (patch)
treeb1ab8dbe670a1f96a3f625dc4649973cb2d1e157 /crypto/test
parentAdded support for PKCS7 signed content in CMS. Port from Java BC. #310 #232 (diff)
downloadBouncyCastle.NET-ed25519-62486175817538acb3620f213c1d72e020774ec4.tar.xz
Added test for PKCS7 signed content parsing #310 #232
Signed-off-by: Alexander Scheel <alexander.scheel@keyfactor.com>
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/data/cms/sigs/Pkcs7SignedContent.p7bbin0 -> 8360 bytes
-rw-r--r--crypto/test/src/cms/test/SignedDataTest.cs8
2 files changed, 8 insertions, 0 deletions
diff --git a/crypto/test/data/cms/sigs/Pkcs7SignedContent.p7b b/crypto/test/data/cms/sigs/Pkcs7SignedContent.p7b
new file mode 100644
index 000000000..d8986b228
--- /dev/null
+++ b/crypto/test/data/cms/sigs/Pkcs7SignedContent.p7b
Binary files differdiff --git a/crypto/test/src/cms/test/SignedDataTest.cs b/crypto/test/src/cms/test/SignedDataTest.cs
index f16edb3f2..78a5015b2 100644
--- a/crypto/test/src/cms/test/SignedDataTest.cs
+++ b/crypto/test/src/cms/test/SignedDataTest.cs
@@ -1485,6 +1485,14 @@ namespace Org.BouncyCastle.Cms.Tests
 			}
 		}
 
+		[Test]
+		public void TestPkcs7SignedContent()
+		{
+			CmsSignedData sig = new CmsSignedData(GetInput("Pkcs7SignedContent.p7b"));
+
+			VerifySignatures(sig);
+		}
+
         private static void DoTestSample(string sigName)
         {
             CmsSignedData sig = new CmsSignedData(GetInput(sigName));