org.bouncycastle.jce.provider.X509StoreCertCollection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcprov-jdk14 Show documentation
Show all versions of bcprov-jdk14 Show documentation
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. The package is organised
so that it contains a light-weight API suitable for use in any environment (including the newly released J2ME)
with the additional infrastructure to conform the algorithms to the JCE framework.
package org.bouncycastle.jce.provider;
import org.bouncycastle.util.CollectionStore;
import org.bouncycastle.util.Selector;
import org.bouncycastle.x509.X509CollectionStoreParameters;
import org.bouncycastle.x509.X509StoreParameters;
import org.bouncycastle.x509.X509StoreSpi;
import java.util.Collection;
public class X509StoreCertCollection
extends X509StoreSpi
{
private CollectionStore _store;
public X509StoreCertCollection()
{
}
public void engineInit(X509StoreParameters params)
{
if (!(params instanceof X509CollectionStoreParameters))
{
throw new IllegalArgumentException(params.toString());
}
_store = new CollectionStore(((X509CollectionStoreParameters)params).getCollection());
}
public Collection engineGetMatches(Selector selector)
{
return _store.getMatches(selector);
}
}