throw new AnnotatedException(
"None of the names in the CRL issuing distribution point matches one "
+ "of the names in a cRLIssuer field of the certificate CRL distribution point.");
}
}
BasicConstraints bc = null;
try
{
bc = BasicConstraints.getInstance(CertPathValidatorUtilities
.getExtensionValue((java.security.cert.X509Extension)cert, BASIC_CONSTRAINTS));
}
catch (Exception e)
{
throw new AnnotatedException(
"Basic constraints extension could not be decoded.",
e);
}
if (cert instanceof X509Certificate)
{
// (b) (ii)
if (idp.onlyContainsUserCerts() && (bc != null && bc.isCA()))
{
throw new AnnotatedException(
"CA Cert CRL only contains user certificates.");
}
// (b) (iii)
if (idp.onlyContainsCACerts() && (bc == null || !bc.isCA()))
{
throw new AnnotatedException(
"End CRL only contains CA certificates.");
}
}