Example usage for org.bouncycastle.jce.provider RFC3280CertPathUtilities processCRLC

List of usage examples for org.bouncycastle.jce.provider RFC3280CertPathUtilities processCRLC

Introduction

In this page you can find the example usage for org.bouncycastle.jce.provider RFC3280CertPathUtilities processCRLC.

Prototype

protected static void processCRLC(X509CRL deltaCRL, X509CRL completeCRL, PKIXExtendedParameters pkixParams)
        throws AnnotatedException 

Source Link

Document

If use-deltas is set, verify the issuer and scope of the delta CRL.

Usage

From source file:eu.emi.security.authn.x509.helpers.pkipath.bc.RFC3280CertPathUtilitiesHelper.java

License:Open Source License

protected static void processCRLC2(X509CRL deltaCRL, X509CRL completeCRL, ExtendedPKIXParameters pkixParams)
        throws SimpleValidationErrorException {
    try {/* w w  w. j a  v  a 2  s  .co  m*/
        RFC3280CertPathUtilities.processCRLC(deltaCRL, completeCRL, pkixParams);
    } catch (AnnotatedException e) {
        if (e.getMessage().startsWith("Issuing distribution point extension")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.distrPtExtError, e.getCause());
        } else if (e.getMessage().startsWith("Complete CRL issuer does not match delta CRL issuer")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.crlDeltaProblem, e.getMessage());
        } else if (e.getMessage().startsWith(
                "Issuing distribution point extension from delta CRL and complete CRL does not match")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.crlDeltaProblem, e.getMessage());
        } else if (e.getMessage()
                .startsWith("Authority key identifier extension could not be extracted from")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.crlAKIExtError, e.getCause());
        } else if (e.getMessage().startsWith("CRL authority key identifier is null")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.crlAKIExtError, e.getMessage());
        } else if (e.getMessage().startsWith("Delta CRL authority key identifier is null")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.crlAKIExtError, e.getMessage());
        } else if (e.getMessage().startsWith(
                "Delta CRL authority key identifier does not match complete CRL authority key identifier")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.crlDeltaProblem, e.getMessage());
        } else {
            throw new SimpleValidationErrorException(ValidationErrorCode.unknownMsg, e);
        }
    }
}