summary refs log tree commit diff
path: root/crypto/src/asn1/cmp/PKIMessage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/cmp/PKIMessage.cs')
-rw-r--r--crypto/src/asn1/cmp/PKIMessage.cs10
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);
         }
 
         /**