diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-24 12:47:51 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-24 12:47:51 +0700 |
commit | 3b73fe21b3de97c0df89fe72109c8450b7242fa7 (patch) | |
tree | 35bc2dbfb5dc40ec05ea7eb5d3a2481d68432582 /crypto/src/asn1/esf/CertificateValues.cs | |
parent | Cleanup Platform (diff) | |
download | BouncyCastle.NET-ed25519-3b73fe21b3de97c0df89fe72109c8450b7242fa7.tar.xz |
Use generics instead of dynamic checks
Diffstat (limited to 'crypto/src/asn1/esf/CertificateValues.cs')
-rw-r--r-- | crypto/src/asn1/esf/CertificateValues.cs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crypto/src/asn1/esf/CertificateValues.cs b/crypto/src/asn1/esf/CertificateValues.cs index 30a719177..ee0d2830c 100644 --- a/crypto/src/asn1/esf/CertificateValues.cs +++ b/crypto/src/asn1/esf/CertificateValues.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 { @@ -57,12 +56,10 @@ namespace Org.BouncyCastle.Asn1.Esf } public CertificateValues( - IEnumerable certificates) + IEnumerable<X509CertificateStructure> certificates) { if (certificates == null) throw new ArgumentNullException("certificates"); - if (!CollectionUtilities.CheckElementsAreOfType(certificates, typeof(X509CertificateStructure))) - throw new ArgumentException("Must contain only 'X509CertificateStructure' objects", "certificates"); this.certificates = new DerSequence( Asn1EncodableVector.FromEnumerable(certificates)); |