diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-14 14:32:40 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-14 14:32:40 +0700 |
commit | eb89e9957f34982f75f36ef237166ccbc2042768 (patch) | |
tree | 3166947175b520554f5a8363f75f92ba43794b8f /crypto/test | |
parent | (D)TLS: Refactoring around CertificateType support (diff) | |
download | BouncyCastle.NET-ed25519-eb89e9957f34982f75f36ef237166ccbc2042768.tar.xz |
Refactor using MapElements
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/src/asn1/test/CertificateTest.cs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/crypto/test/src/asn1/test/CertificateTest.cs b/crypto/test/src/asn1/test/CertificateTest.cs index 52c5ed1dc..ad1fc8232 100644 --- a/crypto/test/src/asn1/test/CertificateTest.cs +++ b/crypto/test/src/asn1/test/CertificateTest.cs @@ -399,11 +399,7 @@ namespace Org.BouncyCastle.Asn1.Tests // Attributes Asn1Sequence attribSeq = acInfo.Attributes; - AttributeX509[] att = new AttributeX509[attribSeq.Count]; - for (int i = 0; i < attribSeq.Count; i++) - { - att[i] = AttributeX509.GetInstance(attribSeq[i]); - } + AttributeX509[] att = attribSeq.MapElements(AttributeX509.GetInstance); // IssuerUniqueId // TODO, how to best test? @@ -465,11 +461,7 @@ namespace Org.BouncyCastle.Asn1.Tests // Attributes Asn1Sequence attribSeq = acInfo.Attributes; - AttributeX509[] att = new AttributeX509[attribSeq.Count]; - for (int i = 0; i < attribSeq.Count; i++) - { - att[i] = AttributeX509.GetInstance(attribSeq[i]); - } + AttributeX509[] att = attribSeq.MapElements(AttributeX509.GetInstance); // IssuerUniqueId // TODO, how to best test? |