Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.jce.provider;
 
 import java.util.Set;
 
A SPI implementation of Bouncy Castle X509Store for getting certificate revocation lists from an LDAP directory.

public class X509StoreLDAPCRLs extends X509StoreSpi
    private LDAPStoreHelper helper;
    public X509StoreLDAPCRLs()
    {
    }

    
Initializes this LDAP CRL store implementation.

Parameters:
params X509LDAPCertStoreParameters.
Throws:
java.lang.IllegalArgumentException if params is not an instance of X509LDAPCertStoreParameters.
    public void engineInit(X509StoreParameters params)
    {
        if (!(params instanceof X509LDAPCertStoreParameters))
        {
            throw new IllegalArgumentException(
                "Initialization parameters must be an instance of "
                    + X509LDAPCertStoreParameters.class.getName() + ".");
        }
         = new LDAPStoreHelper((X509LDAPCertStoreParameters)params);
    }

    
Returns a collection of matching CRLs from the LDAP location.

The selector must be a of type X509CRLStoreSelector. If it is not an empty collection is returned.

The issuer should be a reasonable criteria for a selector.

Parameters:
selector The selector to use for finding.
Returns:
A collection with the matches.
Throws:
org.bouncycastle.util.StoreException if an exception occurs while searching.
    public Collection engineGetMatches(Selector selectorthrows StoreException
    {
        if (!(selector instanceof X509CRLStoreSelector))
        {
            return .;
        }
        X509CRLStoreSelector xselector = (X509CRLStoreSelector)selector;
        Set set = new HashSet();
        // test only delta CRLs should be selected
        if (xselector.isDeltaCRLIndicatorEnabled())
        {
            set.addAll(.getDeltaCertificateRevocationLists(xselector));
        }
        // nothing specified
        else
        {
            set.addAll(.getDeltaCertificateRevocationLists(xselector));
            set.addAll(.getAttributeAuthorityRevocationLists(xselector));
            set
                .addAll(
                    .getAttributeCertificateRevocationLists(xselector));
            set.addAll(.getAuthorityRevocationLists(xselector));
            set.addAll(.getCertificateRevocationLists(xselector));
        }
        return set;
    }
New to GrepCode? Check out our FAQ X