public class X509LDAPCertStoreSpi
extends java.security.cert.CertStoreSpi
At first a search is performed in the ldap*AttributeNames of the
X509LDAPCertStoreParameters
with the given
information of the subject (for all kind of certificates) or issuer (for
CRLs), respectively, if a X509CertSelector is given with that details. For
CRLs, CA certificates and cross certificates a coarse search is made only for
entries with that content to get more possibly matchign results.
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
LDAP_PROVIDER
Initial Context Factory.
|
private X509LDAPCertStoreParameters |
params |
private static java.lang.String |
REFERRALS_IGNORE
Processing referrals..
|
private static java.lang.String |
SEARCH_SECURITY_LEVEL
Security level to be used for LDAP connections.
|
private static java.lang.String |
URL_CONTEXT_PREFIX
Package Prefix for loading URL context factories.
|
Constructor and Description |
---|
X509LDAPCertStoreSpi(java.security.cert.CertStoreParameters params) |
Modifier and Type | Method and Description |
---|---|
private java.util.Set |
certSubjectSerialSearch(java.security.cert.X509CertSelector xselector,
java.lang.String[] attrs,
java.lang.String attrName,
java.lang.String subjectAttributeName) |
private javax.naming.directory.DirContext |
connectLDAP() |
java.util.Collection |
engineGetCertificates(java.security.cert.CertSelector selector) |
java.util.Collection |
engineGetCRLs(java.security.cert.CRLSelector selector) |
private java.util.Set |
getCACertificates(java.security.cert.X509CertSelector xselector) |
private java.util.Set |
getCrossCertificates(java.security.cert.X509CertSelector xselector) |
private java.util.Set |
getEndCertificates(java.security.cert.X509CertSelector xselector) |
private java.lang.String |
parseDN(java.lang.String subject,
java.lang.String subjectAttributeName) |
private java.util.Set |
search(java.lang.String attributeName,
java.lang.String attributeValue,
java.lang.String[] attrs)
Returns a Set of byte arrays with the certificate or CRL encodings.
|
private X509LDAPCertStoreParameters params
private static java.lang.String LDAP_PROVIDER
private static java.lang.String REFERRALS_IGNORE
private static final java.lang.String SEARCH_SECURITY_LEVEL
private static final java.lang.String URL_CONTEXT_PREFIX
public X509LDAPCertStoreSpi(java.security.cert.CertStoreParameters params) throws java.security.InvalidAlgorithmParameterException
java.security.InvalidAlgorithmParameterException
private javax.naming.directory.DirContext connectLDAP() throws javax.naming.NamingException
javax.naming.NamingException
private java.lang.String parseDN(java.lang.String subject, java.lang.String subjectAttributeName)
public java.util.Collection engineGetCertificates(java.security.cert.CertSelector selector) throws java.security.cert.CertStoreException
engineGetCertificates
in class java.security.cert.CertStoreSpi
java.security.cert.CertStoreException
private java.util.Set certSubjectSerialSearch(java.security.cert.X509CertSelector xselector, java.lang.String[] attrs, java.lang.String attrName, java.lang.String subjectAttributeName) throws java.security.cert.CertStoreException
java.security.cert.CertStoreException
private java.util.Set getEndCertificates(java.security.cert.X509CertSelector xselector) throws java.security.cert.CertStoreException
java.security.cert.CertStoreException
private java.util.Set getCACertificates(java.security.cert.X509CertSelector xselector) throws java.security.cert.CertStoreException
java.security.cert.CertStoreException
private java.util.Set getCrossCertificates(java.security.cert.X509CertSelector xselector) throws java.security.cert.CertStoreException
java.security.cert.CertStoreException
public java.util.Collection engineGetCRLs(java.security.cert.CRLSelector selector) throws java.security.cert.CertStoreException
engineGetCRLs
in class java.security.cert.CertStoreSpi
java.security.cert.CertStoreException
private java.util.Set search(java.lang.String attributeName, java.lang.String attributeValue, java.lang.String[] attrs) throws java.security.cert.CertStoreException
attributeName
- The attribute name to look for in the LDAP.attributeValue
- The value the attribute name must have.attrs
- The attributes in the LDAP which hold the certificate,
certificate pair or CRL in a found entry.java.security.cert.CertStoreException
Copyright © 1998-2014 Gamma Technologies. All Rights Reserved.