summary refs log tree commit diff
path: root/crypto/src/tls/OfferedPsks.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-28 20:49:58 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-28 20:49:58 +0700
commitdc5029c8650432ae04df78d2ead06a8349176b74 (patch)
tree306f232f9cf53762ccb427225dee958313b884fd /crypto/src/tls/OfferedPsks.cs
parentGenerics migration in Ocsp, OpenPgp (diff)
downloadBouncyCastle.NET-ed25519-dc5029c8650432ae04df78d2ead06a8349176b74.tar.xz
Generics migration in Tls
Diffstat (limited to 'crypto/src/tls/OfferedPsks.cs')
-rw-r--r--crypto/src/tls/OfferedPsks.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/src/tls/OfferedPsks.cs b/crypto/src/tls/OfferedPsks.cs
index 1cc8a2a68..d2860fff6 100644
--- a/crypto/src/tls/OfferedPsks.cs
+++ b/crypto/src/tls/OfferedPsks.cs
@@ -1,5 +1,5 @@
 using System;
-using System.Collections;
+using System.Collections.Generic;
 using System.IO;
 
 using Org.BouncyCastle.Tls.Crypto;
@@ -42,16 +42,16 @@ namespace Org.BouncyCastle.Tls
             }
         }
 
-        private readonly IList m_identities;
-        private readonly IList m_binders;
+        private readonly IList<PskIdentity> m_identities;
+        private readonly IList<byte[]> m_binders;
         private readonly int m_bindersSize;
 
-        public OfferedPsks(IList identities)
+        public OfferedPsks(IList<PskIdentity> identities)
             : this(identities, null, -1)
         {
         }
 
-        private OfferedPsks(IList identities, IList binders, int bindersSize)
+        private OfferedPsks(IList<PskIdentity> identities, IList<byte[]> binders, int bindersSize)
         {
             if (null == identities || identities.Count < 1)
                 throw new ArgumentException("cannot be null or empty", "identities");
@@ -65,7 +65,7 @@ namespace Org.BouncyCastle.Tls
             this.m_bindersSize = bindersSize;
         }
 
-        public IList Binders
+        public IList<byte[]> Binders
         {
             get { return m_binders; }
         }
@@ -75,7 +75,7 @@ namespace Org.BouncyCastle.Tls
             get { return m_bindersSize; }
         }
 
-        public IList Identities
+        public IList<PskIdentity> Identities
         {
             get { return m_identities; }
         }
@@ -186,7 +186,7 @@ namespace Org.BouncyCastle.Tls
         /// <exception cref="IOException"/>
         public static OfferedPsks Parse(Stream input)
         {
-            IList identities = Platform.CreateArrayList();
+            var identities = new List<PskIdentity>();
             {
                 int totalLengthIdentities = TlsUtilities.ReadUint16(input);
                 if (totalLengthIdentities < 7)
@@ -202,7 +202,7 @@ namespace Org.BouncyCastle.Tls
                 while (buf.Position < buf.Length);
             }
 
-            IList binders = Platform.CreateArrayList();
+            var binders = new List<byte[]>();
             int totalLengthBinders = TlsUtilities.ReadUint16(input);
             {
                 if (totalLengthBinders < 33)