summary refs log tree commit diff
path: root/crypto/test
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-07-14 14:32:40 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-07-14 14:32:40 +0700
commiteb89e9957f34982f75f36ef237166ccbc2042768 (patch)
tree3166947175b520554f5a8363f75f92ba43794b8f /crypto/test
parent(D)TLS: Refactoring around CertificateType support (diff)
downloadBouncyCastle.NET-ed25519-eb89e9957f34982f75f36ef237166ccbc2042768.tar.xz
Refactor using MapElements
Diffstat (limited to 'crypto/test')
-rw-r--r--crypto/test/src/asn1/test/CertificateTest.cs12
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?