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/crmf/CertReqMsg.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/crmf/CertReqMsg.cs')
-rw-r--r-- | crypto/src/asn1/crmf/CertReqMsg.cs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/crypto/src/asn1/crmf/CertReqMsg.cs b/crypto/src/asn1/crmf/CertReqMsg.cs index 03ce32d99..ba9cfd389 100644 --- a/crypto/src/asn1/crmf/CertReqMsg.cs +++ b/crypto/src/asn1/crmf/CertReqMsg.cs @@ -81,15 +81,7 @@ namespace Org.BouncyCastle.Asn1.Crmf public virtual AttributeTypeAndValue[] GetRegInfo() { - if (regInfo == null) - return null; - - AttributeTypeAndValue[] results = new AttributeTypeAndValue[regInfo.Count]; - for (int i = 0; i != results.Length; ++i) - { - results[i] = AttributeTypeAndValue.GetInstance(regInfo[i]); - } - return results; + return regInfo?.MapElements(AttributeTypeAndValue.GetInstance); } /** |