summary refs log tree commit diff
path: root/crypto/test/src
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2021-10-08 17:02:10 +1100
committerDavid Hook <dgh@cryptoworkshop.com>2021-10-08 17:02:10 +1100
commit875bf434eceb99193d109d94ec16212b8ff0618e (patch)
treeae0a15d169a0a168a4bcb7e0d4c17a9f1e3a71ab /crypto/test/src
parentadded explicit sorting of DER encoded SET (diff)
downloadBouncyCastle.NET-ed25519-875bf434eceb99193d109d94ec16212b8ff0618e.tar.xz
completed copy constructor in SignerInformation, fixed mutable issue for SET in ASN1Encodable
Diffstat (limited to 'crypto/test/src')
-rw-r--r--crypto/test/src/cms/test/SignedDataTest.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/crypto/test/src/cms/test/SignedDataTest.cs b/crypto/test/src/cms/test/SignedDataTest.cs
index 68214c3c8..41af04874 100644
--- a/crypto/test/src/cms/test/SignedDataTest.cs
+++ b/crypto/test/src/cms/test/SignedDataTest.cs
@@ -1257,8 +1257,10 @@ namespace Org.BouncyCastle.Cms.Tests
 
 				certEnum.MoveNext();
 				X509Certificate cert = (X509Certificate) certEnum.Current;
+				SignerInformation sAsIs = new AsIsSignerInformation(signer);
 
-				Assert.IsTrue(new AsIsSignerInformation(signer).Verify(cert));
+				Assert.IsFalse(signer.Verify(cert));
+				Assert.IsTrue(sAsIs.Verify(cert));
 			}
 		}
 
@@ -1586,6 +1588,15 @@ namespace Org.BouncyCastle.Cms.Tests
 				X509Certificate cert = (X509Certificate)certEnum.Current;
 
 				Assert.IsTrue(signer.Verify(cert));
+				Assert.IsTrue(new MySignerInformation(signer).Verify(cert)); // test simple copy works
+			}
+		}
+
+		class MySignerInformation: SignerInformation
+		{
+			public MySignerInformation(SignerInformation sigInf): base(sigInf)
+			{
+
 			}
 		}
     }