diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-26 20:47:24 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-26 20:47:24 +0700 |
commit | eed964522f8e198a33267387942b1764018dfe1e (patch) | |
tree | c6bcead7e5e54c88845287d10bca6a1235e655e8 /crypto/src/x509/AttributeCertificateHolder.cs | |
parent | Cleanup in PQC code (diff) | |
download | BouncyCastle.NET-ed25519-eed964522f8e198a33267387942b1764018dfe1e.tar.xz |
Replace IX509Store API with new store/selector API
- overhaul Cms, Pkix, X509 APIs
Diffstat (limited to 'crypto/src/x509/AttributeCertificateHolder.cs')
-rw-r--r-- | crypto/src/x509/AttributeCertificateHolder.cs | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/crypto/src/x509/AttributeCertificateHolder.cs b/crypto/src/x509/AttributeCertificateHolder.cs index 7cd869b4b..b3cea1cfe 100644 --- a/crypto/src/x509/AttributeCertificateHolder.cs +++ b/crypto/src/x509/AttributeCertificateHolder.cs @@ -7,7 +7,7 @@ using Org.BouncyCastle.Math; using Org.BouncyCastle.Security; using Org.BouncyCastle.Security.Certificates; using Org.BouncyCastle.Utilities; -using Org.BouncyCastle.X509.Store; +using Org.BouncyCastle.Utilities.Collections; namespace Org.BouncyCastle.X509 { @@ -28,7 +28,7 @@ namespace Org.BouncyCastle.X509 /// </remarks> public class AttributeCertificateHolder //: CertSelector, Selector - : IX509Selector + : ISelector<X509Certificate> { internal readonly Holder holder; @@ -325,9 +325,11 @@ namespace Org.BouncyCastle.X509 return new AttributeCertificateHolder((Asn1Sequence)holder.ToAsn1Object()); } - public bool Match( - X509Certificate x509Cert) + public bool Match(X509Certificate x509Cert) { + if (x509Cert == null) + return false; + try { if (holder.BaseCertificateID != null) @@ -417,17 +419,5 @@ namespace Org.BouncyCastle.X509 { return this.holder.GetHashCode(); } - - public bool Match( - object obj) - { - if (!(obj is X509Certificate)) - { - return false; - } - -// return Match((Certificate)obj); - return Match((X509Certificate)obj); - } } } |