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/pkix/PkixAttrCertPathBuilder.cs | |
parent | Refactoring around Platform (diff) | |
download | BouncyCastle.NET-ed25519-435210f10fd927653ce8fbc04ec537ae5d8966b6.tar.xz |
Generics migration complete
Diffstat (limited to 'crypto/src/pkix/PkixAttrCertPathBuilder.cs')
-rw-r--r-- | crypto/src/pkix/PkixAttrCertPathBuilder.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/pkix/PkixAttrCertPathBuilder.cs b/crypto/src/pkix/PkixAttrCertPathBuilder.cs index b10f64d6b..c583bff00 100644 --- a/crypto/src/pkix/PkixAttrCertPathBuilder.cs +++ b/crypto/src/pkix/PkixAttrCertPathBuilder.cs @@ -161,17 +161,17 @@ namespace Org.BouncyCastle.Pkix } // try to get the issuer certificate from one of the stores - ISet issuers = new HashSet(); + ISet<X509Certificate> issuers; try { - issuers.AddAll(PkixCertPathValidatorUtilities.FindIssuerCerts(tbvCert, pkixParams)); + issuers = PkixCertPathValidatorUtilities.FindIssuerCerts(tbvCert, pkixParams); } catch (Exception e) { throw new Exception("Cannot find issuer certificate for certificate in certification path.", e); } - if (issuers.IsEmpty) + if (issuers.Count < 1) throw new Exception("No issuer certificate for certificate in certification path found."); foreach (X509Certificate issuer in issuers) |