summary refs log tree commit diff
path: root/crypto/src/x509/X509V2AttributeCertificate.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/x509/X509V2AttributeCertificate.cs')
-rw-r--r--crypto/src/x509/X509V2AttributeCertificate.cs14
1 files changed, 4 insertions, 10 deletions
diff --git a/crypto/src/x509/X509V2AttributeCertificate.cs b/crypto/src/x509/X509V2AttributeCertificate.cs
index 61bb8c879..8c6ff0062 100644
--- a/crypto/src/x509/X509V2AttributeCertificate.cs
+++ b/crypto/src/x509/X509V2AttributeCertificate.cs
@@ -1,5 +1,5 @@
 using System;
-using System.Collections;
+using System.Collections.Generic;
 using System.IO;
 
 using Org.BouncyCastle.Asn1;
@@ -235,7 +235,7 @@ namespace Org.BouncyCastle.X509
 			string oid)
 		{
 			Asn1Sequence seq = cert.ACInfo.Attributes;
-			IList list = Platform.CreateArrayList();
+			var list = new List<X509Attribute>();
 
 			for (int i = 0; i != seq.Count; i++)
 			{
@@ -251,16 +251,10 @@ namespace Org.BouncyCastle.X509
 				return null;
 			}
 
-            X509Attribute[] result = new X509Attribute[list.Count];
-            for (int i = 0; i < list.Count; ++i)
-            {
-                result[i] = (X509Attribute)list[i];
-            }
-            return result;
+			return list.ToArray();
 		}
 
-		public override bool Equals(
-			object obj)
+		public override bool Equals(object obj)
 		{
 			if (obj == this)
 				return true;