summary refs log tree commit diff
path: root/crypto/src/ocsp/BasicOCSPResp.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/ocsp/BasicOCSPResp.cs')
-rw-r--r--crypto/src/ocsp/BasicOCSPResp.cs21
1 files changed, 5 insertions, 16 deletions
diff --git a/crypto/src/ocsp/BasicOCSPResp.cs b/crypto/src/ocsp/BasicOCSPResp.cs
index 3e22931af..9986136ce 100644
--- a/crypto/src/ocsp/BasicOCSPResp.cs
+++ b/crypto/src/ocsp/BasicOCSPResp.cs
@@ -65,23 +65,12 @@ namespace Org.BouncyCastle.Ocsp
 			get { return data.ProducedAt.ToDateTime(); }
 		}
 
-		public SingleResp[] Responses
-		{
-			get
-			{
-				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[] Responses
+        {
+            get { return data.Responses.MapElements(element => new SingleResp(SingleResponse.GetInstance(element))); }
+        }
 
-		public X509Extensions ResponseExtensions
+        public X509Extensions ResponseExtensions
 		{
 			get { return data.ResponseExtensions; }
 		}