summary refs log tree commit diff
path: root/crypto/src/ocsp/RespData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/ocsp/RespData.cs')
-rw-r--r--crypto/src/ocsp/RespData.cs18
1 files changed, 5 insertions, 13 deletions
diff --git a/crypto/src/ocsp/RespData.cs b/crypto/src/ocsp/RespData.cs
index 00de1cd59..e132c45b1 100644
--- a/crypto/src/ocsp/RespData.cs
+++ b/crypto/src/ocsp/RespData.cs
@@ -33,20 +33,12 @@ namespace Org.BouncyCastle.Ocsp
 			get { return data.ProducedAt.ToDateTime(); }
 		}
 
-		public SingleResp[] GetResponses()
-		{
-			Asn1Sequence s = data.Responses;
-			SingleResp[] rs = new SingleResp[s.Count];
-
-			for (int i = 0; i != rs.Length; i++)
-			{
-				rs[i] = new SingleResp(SingleResponse.GetInstance(s[i]));
-			}
-
-			return rs;
-		}
+        public SingleResp[] GetResponses()
+        {
+            return data.Responses.MapElements(element => new SingleResp(SingleResponse.GetInstance(element)));
+        }
 
-		public X509Extensions ResponseExtensions
+        public X509Extensions ResponseExtensions
 		{
 			get { return data.ResponseExtensions; }
 		}