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/qualified | |
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/qualified')
-rw-r--r-- | crypto/src/asn1/x509/qualified/SemanticsInformation.cs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/crypto/src/asn1/x509/qualified/SemanticsInformation.cs b/crypto/src/asn1/x509/qualified/SemanticsInformation.cs index 1106e10b1..36a15edec 100644 --- a/crypto/src/asn1/x509/qualified/SemanticsInformation.cs +++ b/crypto/src/asn1/x509/qualified/SemanticsInformation.cs @@ -61,18 +61,13 @@ namespace Org.BouncyCastle.Asn1.X509.Qualified } } - if (obj != null) + if (obj != null) { - Asn1Sequence generalNameSeq = Asn1Sequence.GetInstance(obj); - nameRegistrationAuthorities = new GeneralName[generalNameSeq.Count]; - for (int i= 0; i < generalNameSeq.Count; i++) - { - nameRegistrationAuthorities[i] = GeneralName.GetInstance(generalNameSeq[i]); - } + this.nameRegistrationAuthorities = Asn1Sequence.GetInstance(obj).MapElements(GeneralName.GetInstance); } } - public SemanticsInformation( + public SemanticsInformation( DerObjectIdentifier semanticsIdentifier, GeneralName[] generalNames) { |