use of com.sun.identity.security.cert.AMCertPath in project OpenAM by OpenRock.
the class Cert method doJCERevocationValidation.
private int doJCERevocationValidation(X509Certificate[] allCerts) throws AuthLoginException {
int ret = ISAuthConstants.LOGIN_IGNORE;
try {
Vector crls = new Vector();
for (X509Certificate cert : allCerts) {
X509CRL crl = AMCRLStore.getCRL(ldapParam, cert, amAuthCert_chkAttributesCRL);
if (crl != null) {
crls.add(crl);
}
}
if (debug.messageEnabled()) {
debug.message("Cert.doRevocationValidation: crls size = " + crls.size());
if (crls.size() > 0) {
debug.message("CRL = " + crls.toString());
}
}
AMCertPath certpath = new AMCertPath(crls);
if (!certpath.verify(allCerts, crlEnabled, ocspEnabled)) {
debug.error("CertPath:verify failed.");
return ret;
} else {
if (debug.messageEnabled()) {
debug.message("CertPath:verify success.");
}
}
ret = ISAuthConstants.LOGIN_SUCCEED;
} catch (Exception e) {
debug.error("Cert.doRevocationValidation: verify failed.", e);
}
return ret;
}
Aggregations