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/src/asn1/x509/CRLDistPoint.cs | |
parent | (D)TLS: Refactoring around CertificateType support (diff) | |
download | BouncyCastle.NET-ed25519-eb89e9957f34982f75f36ef237166ccbc2042768.tar.xz |
Refactor using MapElements
Diffstat (limited to 'crypto/src/asn1/x509/CRLDistPoint.cs')
-rw-r--r-- | crypto/src/asn1/x509/CRLDistPoint.cs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/crypto/src/asn1/x509/CRLDistPoint.cs b/crypto/src/asn1/x509/CRLDistPoint.cs index 518bf3f00..889769f29 100644 --- a/crypto/src/asn1/x509/CRLDistPoint.cs +++ b/crypto/src/asn1/x509/CRLDistPoint.cs @@ -41,24 +41,17 @@ namespace Org.BouncyCastle.Asn1.X509 seq = new DerSequence(points); } - /** + /** * Return the distribution points making up the sequence. * * @return DistributionPoint[] */ public DistributionPoint[] GetDistributionPoints() { - DistributionPoint[] dp = new DistributionPoint[seq.Count]; - - for (int i = 0; i != seq.Count; ++i) - { - dp[i] = DistributionPoint.GetInstance(seq[i]); - } - - return dp; + return seq.MapElements(DistributionPoint.GetInstance); } - /** + /** * Produce an object suitable for an Asn1OutputStream. * <pre> * CrlDistPoint ::= Sequence SIZE {1..MAX} OF DistributionPoint |