summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2021-10-07 11:20:11 +1100
committerDavid Hook <dgh@cryptoworkshop.com>2021-10-07 11:20:11 +1100
commit81977ab62fb74af1624930718b83acd8c5c78f72 (patch)
treea756d3dda3e967dffe1c97c6876f5fbaf4a51e88 /crypto/test
parentcorrected DER encoding of SET (diff)
downloadBouncyCastle.NET-ed25519-81977ab62fb74af1624930718b83acd8c5c78f72.tar.xz
added explicit sorting of DER encoded SET
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/cms/test/SignedDataTest.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/crypto/test/src/cms/test/SignedDataTest.cs b/crypto/test/src/cms/test/SignedDataTest.cs
index 65e0c4d57..68214c3c8 100644
--- a/crypto/test/src/cms/test/SignedDataTest.cs
+++ b/crypto/test/src/cms/test/SignedDataTest.cs
@@ -1258,7 +1258,22 @@ namespace Org.BouncyCastle.Cms.Tests
 				certEnum.MoveNext();
 				X509Certificate cert = (X509Certificate) certEnum.Current;
 
-				Assert.IsTrue(signer.Verify(cert));
+				Assert.IsTrue(new AsIsSignerInformation(signer).Verify(cert));
+			}
+		}
+
+	    class AsIsSignerInformation : SignerInformation
+		{
+			public AsIsSignerInformation(SignerInformation sInfo): base(sInfo)
+			{
+
+			}
+
+			public override byte[] GetEncodedSignedAttributes()
+			{
+				return signedAttributeSet == null
+					? null
+					: signedAttributeSet.GetEncoded();
 			}
 		}