Example usage for org.bouncycastle.cms CMSSignedDataParser getCRLs

List of usage examples for org.bouncycastle.cms CMSSignedDataParser getCRLs

Introduction

In this page you can find the example usage for org.bouncycastle.cms CMSSignedDataParser getCRLs.

Prototype

public Store getCRLs() throws CMSException 

Source Link

Document

Return any X.509 CRL objects in this SignedData structure as a Store of X509CRLHolder objects.

Usage

From source file:net.ripe.rpki.commons.crypto.util.BouncyCastleUtil.java

License:BSD License

public static List<? extends X509CRL> extractCrls(CMSSignedDataParser signedDataParser)
        throws StoreException, CMSException, CRLException {
    @SuppressWarnings("unchecked")
    Collection<X509CRLHolder> holders = signedDataParser.getCRLs().getMatches(new X509CRLHolderStoreSelector());
    List<X509CRL> result = new ArrayList<X509CRL>();
    for (X509CRLHolder holder : holders) {
        result.add(holderToCrl(holder));
    }/*from   w w w .j  av  a2s. c o  m*/
    return result;
}