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

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

Introduction

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

Prototype

protected static void processCRLB1(DistributionPoint dp, Object cert, X509CRL crl) throws AnnotatedException 

Source Link

Document

If the DP includes cRLIssuer, then verify that the issuer field in the complete CRL matches cRLIssuer in the DP and that the complete CRL contains an issuing distribution point extension with the indirectCRL boolean asserted.

Usage

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

License:Open Source License

protected static void processCRLB1_2(DistributionPoint dp, Object cert, X509CRL crl)
        throws SimpleValidationErrorException {
    try {//from   w w  w  . java 2s  .c  o  m
        RFC3280CertPathUtilities.processCRLB1(dp, cert, crl);
    } catch (AnnotatedException e) {
        if (e.getMessage().startsWith("CRL issuer information from distribution point cannot be decoded")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.crlIssuerException, e.getCause());
        } else if (e.getMessage()
                .startsWith("Distribution point contains cRLIssuer field but CRL is not indirect")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.distrPtExtError, e.getMessage());
        } else if (e.getMessage()
                .startsWith("CRL issuer of CRL does not match CRL issuer of distribution point")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.distrPtExtError, e.getMessage());
        } else if (e.getMessage().startsWith("Cannot find matching CRL issuer for certificate")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.crlNoIssuerForDP);
        } else if (e.getMessage().startsWith("exception processing extension")) {
            throw new SimpleValidationErrorException(ValidationErrorCode.distrPtExtError, e.getCause());
        } else {
            throw new SimpleValidationErrorException(ValidationErrorCode.unknownMsg, e);
        }
    }
}