diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-01-17 20:32:13 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-01-17 20:32:13 +0700 |
commit | 2e1dc7df1b47554ed229b65b9574973b43541a10 (patch) | |
tree | fd8b51ede5fe64ef823d8eb60c5db17e40f31544 /crypto/src/asn1/cmp/PKIMessage.cs | |
parent | FIx fetching of DateOfCertGen extension (diff) | |
download | BouncyCastle.NET-ed25519-2e1dc7df1b47554ed229b65b9574973b43541a10.tar.xz |
Refactoring in Asn1
Diffstat (limited to 'crypto/src/asn1/cmp/PKIMessage.cs')
-rw-r--r-- | crypto/src/asn1/cmp/PKIMessage.cs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/crypto/src/asn1/cmp/PKIMessage.cs b/crypto/src/asn1/cmp/PKIMessage.cs index c87bf2126..9ac54b3da 100644 --- a/crypto/src/asn1/cmp/PKIMessage.cs +++ b/crypto/src/asn1/cmp/PKIMessage.cs @@ -96,15 +96,7 @@ namespace Org.BouncyCastle.Asn1.Cmp public virtual CmpCertificate[] GetExtraCerts() { - if (extraCerts == null) - return null; - - CmpCertificate[] results = new CmpCertificate[extraCerts.Count]; - for (int i = 0; i < results.Length; ++i) - { - results[i] = CmpCertificate.GetInstance(extraCerts[i]); - } - return results; + return extraCerts?.MapElements(CmpCertificate.GetInstance); } /** |