summaryrefslogtreecommitdiffstats
path: root/bcprov/src/main/java/org/bouncycastle/jce/provider/RFC3280CertPathUtilities.java
diff options
context:
space:
mode:
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/jce/provider/RFC3280CertPathUtilities.java')
-rw-r--r--bcprov/src/main/java/org/bouncycastle/jce/provider/RFC3280CertPathUtilities.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/jce/provider/RFC3280CertPathUtilities.java b/bcprov/src/main/java/org/bouncycastle/jce/provider/RFC3280CertPathUtilities.java
index 7357894..415f840 100644
--- a/bcprov/src/main/java/org/bouncycastle/jce/provider/RFC3280CertPathUtilities.java
+++ b/bcprov/src/main/java/org/bouncycastle/jce/provider/RFC3280CertPathUtilities.java
@@ -1669,7 +1669,7 @@ public class RFC3280CertPathUtilities
//
// (g) (1) permitted subtrees
//
- ASN1Sequence permitted = nc.getPermittedSubtrees();
+ GeneralSubtree[] permitted = nc.getPermittedSubtrees();
if (permitted != null)
{
try
@@ -1686,17 +1686,13 @@ public class RFC3280CertPathUtilities
//
// (g) (2) excluded subtrees
//
- ASN1Sequence excluded = nc.getExcludedSubtrees();
+ GeneralSubtree[] excluded = nc.getExcludedSubtrees();
if (excluded != null)
{
- Enumeration e = excluded.getObjects();
+ for (int i = 0; i != excluded.length; i++)
try
{
- while (e.hasMoreElements())
- {
- GeneralSubtree subtree = GeneralSubtree.getInstance(e.nextElement());
- nameConstraintValidator.addExcludedSubtree(subtree);
- }
+ nameConstraintValidator.addExcludedSubtree(excluded[i]);
}
catch (Exception ex)
{
@@ -2203,7 +2199,7 @@ public class RFC3280CertPathUtilities
}
if (!criticalExtensions.isEmpty())
{
- throw new ExtCertPathValidatorException("Certificate has unsupported critical extension.", null, certPath,
+ throw new ExtCertPathValidatorException("Certificate has unsupported critical extension: " + criticalExtensions, null, certPath,
index);
}
}
@@ -2384,7 +2380,7 @@ public class RFC3280CertPathUtilities
if (!criticalExtensions.isEmpty())
{
- throw new ExtCertPathValidatorException("Certificate has unsupported critical extension", null, certPath,
+ throw new ExtCertPathValidatorException("Certificate has unsupported critical extension: " + criticalExtensions, null, certPath,
index);
}
}