summary refs log tree commit diff
path: root/crypto/src/asn1/esf/OtherSigningCertificate.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-24 12:47:51 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-24 12:47:51 +0700
commit3b73fe21b3de97c0df89fe72109c8450b7242fa7 (patch)
tree35bc2dbfb5dc40ec05ea7eb5d3a2481d68432582 /crypto/src/asn1/esf/OtherSigningCertificate.cs
parentCleanup Platform (diff)
downloadBouncyCastle.NET-ed25519-3b73fe21b3de97c0df89fe72109c8450b7242fa7.tar.xz
Use generics instead of dynamic checks
Diffstat (limited to 'crypto/src/asn1/esf/OtherSigningCertificate.cs')
-rw-r--r--crypto/src/asn1/esf/OtherSigningCertificate.cs14
1 files changed, 4 insertions, 10 deletions
diff --git a/crypto/src/asn1/esf/OtherSigningCertificate.cs b/crypto/src/asn1/esf/OtherSigningCertificate.cs
index 2b6d646bc..a4f4a0727 100644
--- a/crypto/src/asn1/esf/OtherSigningCertificate.cs
+++ b/crypto/src/asn1/esf/OtherSigningCertificate.cs
@@ -1,9 +1,8 @@
 using System;
-using System.Collections;
+using System.Collections.Generic;
 
 using Org.BouncyCastle.Asn1.X509;
 using Org.BouncyCastle.Utilities;
-using Org.BouncyCastle.Utilities.Collections;
 
 namespace Org.BouncyCastle.Asn1.Esf
 {
@@ -74,28 +73,23 @@ namespace Org.BouncyCastle.Asn1.Esf
 		}
 
 		public OtherSigningCertificate(
-			IEnumerable certs)
+			IEnumerable<OtherCertID> certs)
 			: this(certs, null)
 		{
 		}
 
 		public OtherSigningCertificate(
-			IEnumerable	certs,
-			IEnumerable	policies)
+			IEnumerable<OtherCertID> certs,
+			IEnumerable<PolicyInformation> policies)
 		{
 			if (certs == null)
 				throw new ArgumentNullException("certs");
-			if (!CollectionUtilities.CheckElementsAreOfType(certs, typeof(OtherCertID)))
-				throw new ArgumentException("Must contain only 'OtherCertID' objects", "certs");
 
 			this.certs = new DerSequence(
 				Asn1EncodableVector.FromEnumerable(certs));
 
 			if (policies != null)
 			{
-				if (!CollectionUtilities.CheckElementsAreOfType(policies, typeof(PolicyInformation)))
-					throw new ArgumentException("Must contain only 'PolicyInformation' objects", "policies");
-
 				this.policies = new DerSequence(
 					Asn1EncodableVector.FromEnumerable(policies));
 			}