diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-29 14:15:10 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-29 14:15:10 +0700 |
commit | 435210f10fd927653ce8fbc04ec537ae5d8966b6 (patch) | |
tree | 27b6ed1c029db271c3429ac57629d7f0156c5fed /crypto/src/x509/store/X509CertStoreSelector.cs | |
parent | Refactoring around Platform (diff) | |
download | BouncyCastle.NET-ed25519-435210f10fd927653ce8fbc04ec537ae5d8966b6.tar.xz |
Generics migration complete
Diffstat (limited to 'crypto/src/x509/store/X509CertStoreSelector.cs')
-rw-r--r-- | crypto/src/x509/store/X509CertStoreSelector.cs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/crypto/src/x509/store/X509CertStoreSelector.cs b/crypto/src/x509/store/X509CertStoreSelector.cs index 197e8f26d..71b5419a7 100644 --- a/crypto/src/x509/store/X509CertStoreSelector.cs +++ b/crypto/src/x509/store/X509CertStoreSelector.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.X509; @@ -20,11 +20,11 @@ namespace Org.BouncyCastle.X509.Store private int basicConstraints = -1; private X509Certificate certificate; private DateTimeObject certificateValid; - private ISet extendedKeyUsage; + private ISet<DerObjectIdentifier> extendedKeyUsage; private bool ignoreX509NameOrdering; private X509Name issuer; private bool[] keyUsage; - private ISet policy; + private ISet<DerObjectIdentifier> policy; private DateTimeObject privateKeyValid; private BigInteger serialNumber; private X509Name subject; @@ -91,7 +91,7 @@ namespace Org.BouncyCastle.X509.Store set { certificateValid = value; } } - public ISet ExtendedKeyUsage + public ISet<DerObjectIdentifier> ExtendedKeyUsage { get { return CopySet(extendedKeyUsage); } set { extendedKeyUsage = CopySet(value); } @@ -118,7 +118,7 @@ namespace Org.BouncyCastle.X509.Store /// <summary> /// An <code>ISet</code> of <code>DerObjectIdentifier</code> objects. /// </summary> - public ISet Policy + public ISet<DerObjectIdentifier> Policy { get { return CopySet(policy); } set { policy = CopySet(value); } @@ -300,10 +300,9 @@ namespace Org.BouncyCastle.X509.Store return b == null ? null : (bool[]) b.Clone(); } - private static ISet CopySet( - ISet s) + private static ISet<T> CopySet<T>(ISet<T> s) { - return s == null ? null : new HashSet(s); + return s == null ? null : new HashSet<T>(s); } private static SubjectPublicKeyInfo GetSubjectPublicKey( |