summary refs log tree commit diff
path: root/crypto/src/ocsp/OCSPReq.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/ocsp/OCSPReq.cs')
-rw-r--r--crypto/src/ocsp/OCSPReq.cs18
1 files changed, 5 insertions, 13 deletions
diff --git a/crypto/src/ocsp/OCSPReq.cs b/crypto/src/ocsp/OCSPReq.cs
index 194b6c9c7..51cb93b58 100644
--- a/crypto/src/ocsp/OCSPReq.cs
+++ b/crypto/src/ocsp/OCSPReq.cs
@@ -109,20 +109,12 @@ namespace Org.BouncyCastle.Ocsp
 			get { return GeneralName.GetInstance(req.TbsRequest.RequestorName); }
 		}
 
-		public Req[] GetRequestList()
-		{
-			Asn1Sequence seq = req.TbsRequest.RequestList;
-			Req[] requests = new Req[seq.Count];
-
-			for (int i = 0; i != requests.Length; i++)
-			{
-				requests[i] = new Req(Request.GetInstance(seq[i]));
-			}
-
-			return requests;
-		}
+        public Req[] GetRequestList()
+        {
+            return req.TbsRequest.RequestList.MapElements(element => new Req(Request.GetInstance(element)));
+        }
 
-		public X509Extensions RequestExtensions
+        public X509Extensions RequestExtensions
 		{
 			get { return X509Extensions.GetInstance(req.TbsRequest.RequestExtensions); }
 		}