summary refs log tree commit diff
path: root/crypto/src/asn1/crmf/Controls.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/crmf/Controls.cs')
-rw-r--r--crypto/src/asn1/crmf/Controls.cs7
1 files changed, 1 insertions, 6 deletions
diff --git a/crypto/src/asn1/crmf/Controls.cs b/crypto/src/asn1/crmf/Controls.cs
index 70b48a959..ac568d741 100644
--- a/crypto/src/asn1/crmf/Controls.cs
+++ b/crypto/src/asn1/crmf/Controls.cs
@@ -33,12 +33,7 @@ namespace Org.BouncyCastle.Asn1.Crmf
 
         public virtual AttributeTypeAndValue[] ToAttributeTypeAndValueArray()
         {
-            AttributeTypeAndValue[] result = new AttributeTypeAndValue[content.Count];
-            for (int i = 0; i != result.Length; ++i)
-            {
-                result[i] = AttributeTypeAndValue.GetInstance(content[i]);
-            }
-            return result;
+            return content.MapElements(AttributeTypeAndValue.GetInstance);
         }
 
         /**