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 cross certificates pairs from an LDAP directory.

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

    
Initializes this LDAP cross certificate pair store implementation.

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

    
Returns a collection of matching cross certificate pairs from the LDAP location.

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

The subject 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 X509CertPairStoreSelector))
        {
            return .;
        }
        X509CertPairStoreSelector xselector = (X509CertPairStoreSelector)selector;
        Set set = new HashSet();
        set.addAll(.getCrossCertificatePairs(xselector));
        return set;
    }
New to GrepCode? Check out our FAQ X