summary refs log tree commit diff
path: root/crypto/src/pkix/PkixAttrCertPathBuilder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/pkix/PkixAttrCertPathBuilder.cs')
-rw-r--r--crypto/src/pkix/PkixAttrCertPathBuilder.cs6
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)