Class ResourceCertStore
- java.lang.Object
-
- java.security.cert.CertStoreSpi
-
- org.globus.gsi.stores.ResourceCertStore
-
public class ResourceCertStore extends java.security.cert.CertStoreSpi
Created by IntelliJ IDEA. User: turtlebender Date: Dec 29, 2009 Time: 12:57:23 PM To change this template use File | Settings | File Templates.
-
-
Field Summary
Fields Modifier and Type Field Description private ResourceCACertStore
caDelegate
private ResourceCRLStore
crlDelegate
private static org.apache.commons.logging.Log
logger
-
Constructor Summary
Constructors Constructor Description ResourceCertStore(java.security.cert.CertStoreParameters params)
The sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<? extends java.security.cert.Certificate>
engineGetCertificates(java.security.cert.CertSelector selector)
Returns aCollection
ofCertificate
s that match the specified selector.java.util.Collection<? extends java.security.cert.CRL>
engineGetCRLs(java.security.cert.CRLSelector selector)
Returns aCollection
ofCRL
s that match the specified selector.
-
-
-
Field Detail
-
logger
private static org.apache.commons.logging.Log logger
-
caDelegate
private ResourceCACertStore caDelegate
-
crlDelegate
private ResourceCRLStore crlDelegate
-
-
Constructor Detail
-
ResourceCertStore
public ResourceCertStore(java.security.cert.CertStoreParameters params) throws java.security.InvalidAlgorithmParameterException, ResourceStoreException
The sole constructor.- Parameters:
params
- the initialization parameters (may benull
)- Throws:
java.security.InvalidAlgorithmParameterException
- if the initialization parameters are inappropriate for thisCertStoreSpi
ResourceStoreException
- If error loading certs and crls.
-
-
Method Detail
-
engineGetCertificates
public java.util.Collection<? extends java.security.cert.Certificate> engineGetCertificates(java.security.cert.CertSelector selector) throws java.security.cert.CertStoreException
Returns aCollection
ofCertificate
s that match the specified selector. If noCertificate
s match the selector, an emptyCollection
will be returned.For some
CertStore
types, the resultingCollection
may not contain all of theCertificate
s that match the selector. For instance, an LDAPCertStore
may not search all entries in the directory. Instead, it may just search entries that are likely to contain theCertificate
s it is looking for.Some
CertStore
implementations (especially LDAPCertStore
s) may throw aCertStoreException
unless a non-nullCertSelector
is provided that includes specific criteria that can be used to find the certificates. Issuer and/or subject names are especially useful criteria.- Specified by:
engineGetCertificates
in classjava.security.cert.CertStoreSpi
- Parameters:
selector
- ACertSelector
used to select whichCertificate
s should be returned. Specifynull
to return allCertificate
s (if supported).- Returns:
- A
Collection
ofCertificate
s that match the specified selector (nevernull
) - Throws:
java.security.cert.CertStoreException
- if an exception occurs
-
engineGetCRLs
public java.util.Collection<? extends java.security.cert.CRL> engineGetCRLs(java.security.cert.CRLSelector selector) throws java.security.cert.CertStoreException
Returns aCollection
ofCRL
s that match the specified selector. If noCRL
s match the selector, an emptyCollection
will be returned.For some
CertStore
types, the resultingCollection
may not contain all of theCRL
s that match the selector. For instance, an LDAPCertStore
may not search all entries in the directory. Instead, it may just search entries that are likely to contain theCRL
s it is looking for.Some
CertStore
implementations (especially LDAPCertStore
s) may throw aCertStoreException
unless a non-nullCRLSelector
is provided that includes specific criteria that can be used to find the CRLs. Issuer names and/or the certificate to be checked are especially useful.- Specified by:
engineGetCRLs
in classjava.security.cert.CertStoreSpi
- Parameters:
selector
- ACRLSelector
used to select whichCRL
s should be returned. Specifynull
to return allCRL
s (if supported).- Returns:
- A
Collection
ofCRL
s that match the specified selector (nevernull
) - Throws:
java.security.cert.CertStoreException
- if an exception occurs
-
-