summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-07-08 22:30:04 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-07-08 22:30:04 +0700
commit069663afa1a8e0a1e86be325e790aaa11572f1be (patch)
tree446ac3ca25dba2d35cc272caabbae2e09c0b1a15
parentASN.1 updates from bc-java (diff)
downloadBouncyCastle.NET-ed25519-069663afa1a8e0a1e86be325e790aaa11572f1be.tar.xz
Test for long inputs
-rw-r--r--crypto/test/src/cms/test/AuthenticatedDataStreamTest.cs11
1 files changed, 5 insertions, 6 deletions
diff --git a/crypto/test/src/cms/test/AuthenticatedDataStreamTest.cs b/crypto/test/src/cms/test/AuthenticatedDataStreamTest.cs
index 89a2174b7..68f38d190 100644
--- a/crypto/test/src/cms/test/AuthenticatedDataStreamTest.cs
+++ b/crypto/test/src/cms/test/AuthenticatedDataStreamTest.cs
@@ -72,14 +72,13 @@ namespace Org.BouncyCastle.Cms.Tests
 		[Test]
 		public void TestKeyTransDESede()
 		{
-			tryKeyTrans(CmsAuthenticatedDataGenerator.DesEde3Cbc);
-		}
+            tryKeyTrans(Encoding.ASCII.GetBytes("Eric H. Echidna"), CmsEnvelopedGenerator.DesEde3Cbc);
+            // force multiple octet-string
+            tryKeyTrans(new byte[2500], CmsEnvelopedGenerator.DesEde3Cbc);
+        }
 
-		private void tryKeyTrans(
-			string macAlg)
+		private void tryKeyTrans(byte[] data, string macAlg)
 		{
-			byte[] data = Encoding.ASCII.GetBytes("Eric H. Echidna");
-
 			CmsAuthenticatedDataStreamGenerator adGen = new CmsAuthenticatedDataStreamGenerator();
 
 			adGen.AddKeyTransRecipient(ReciCert);