diff options
author | David Hook <dgh@cryptoworkshop.com> | 2021-10-07 11:20:11 +1100 |
---|---|---|
committer | David Hook <dgh@cryptoworkshop.com> | 2021-10-07 11:20:11 +1100 |
commit | 81977ab62fb74af1624930718b83acd8c5c78f72 (patch) | |
tree | a756d3dda3e967dffe1c97c6876f5fbaf4a51e88 /crypto/test/src/cms | |
parent | corrected DER encoding of SET (diff) | |
download | BouncyCastle.NET-ed25519-81977ab62fb74af1624930718b83acd8c5c78f72.tar.xz |
added explicit sorting of DER encoded SET
Diffstat (limited to 'crypto/test/src/cms')
-rw-r--r-- | crypto/test/src/cms/test/SignedDataTest.cs | 17 |
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(); } } |