public class LDAPStore extends java.lang.Object implements IDefStore, IExtendedPluginInfo
Modifier and Type | Field and Description |
---|---|
protected java.util.Hashtable |
mReqCounts |
HELP_TEXT, HELP_TOKEN
Constructor and Description |
---|
LDAPStore()
Constructs the default store.
|
Modifier and Type | Method and Description |
---|---|
void |
addCRLIssuingPoint(java.lang.String name,
ICRLIssuingPointRecord rec)
This method adds a CRL issuing point
|
void |
addRepository(java.lang.String name,
java.lang.String thisUpdate,
IRepositoryRecord rec)
This method adds a request to the default OCSP store repository.
|
ICRLIssuingPointRecord |
createCRLIssuingPointRecord(java.lang.String name,
java.math.BigInteger crlNumber,
java.lang.Long crlSize,
java.util.Date thisUpdate,
java.util.Date nextUpdate)
This method creates a CRL issuing point record.
|
IRepositoryRecord |
createRepositoryRecord()
This method creates a an OCSP default store repository record.
|
void |
deleteCRLIssuingPointRecord(java.lang.String id)
This method deletes a CRL issuing point record
|
NameValuePairs |
getConfigParameters()
Provides configuration parameters.
|
IConfigStore |
getConfigStore()
Returns the root configuration storage of this system.
|
java.lang.String[] |
getExtendedPluginInfo(java.util.Locale locale)
This method returns an array of strings.
|
java.lang.String |
getId()
Retrieves the name of this subsystem.
|
long |
getReqCount(java.lang.String id)
This method retrieves the number of OCSP requests since startup.
|
int |
getStateCount()
This method retrieves the number of CRL updates since startup.
|
boolean |
includeNextUpdate() |
void |
incReqCount(java.lang.String id) |
void |
init(ISubsystem owner,
IConfigStore config)
Fetch CA certificate and CRL from LDAP server.
|
boolean |
isNotFoundGood()
This method checks to see if the OCSP response should return good
when the certificate is not found.
|
boolean |
isNotFoundGood1() |
netscape.security.x509.X509CertImpl |
locateCACert(netscape.ldap.LDAPConnection conn,
java.lang.String baseDN)
Locates the CA certificate.
|
netscape.security.x509.X509CRLImpl |
locateCRL(netscape.ldap.LDAPConnection conn,
java.lang.String baseDN)
Locates the CRL.
|
void |
log(int level,
java.lang.String msg) |
ICRLIssuingPointRecord |
readCRLIssuingPoint(java.lang.String name)
This method attempts to read the CRL issuing point.
|
java.util.Enumeration |
searchAllCRLIssuingPointRecord(int maxSize)
This method searches all CRL issuing points.
|
java.util.Enumeration |
searchCRLIssuingPointRecord(java.lang.String filter,
int maxSize)
This method searches all CRL issuing points constrained by the specified
filtering mechanism.
|
void |
setConfigParameters(NameValuePairs pairs)
This method stores the configuration parameters specified by the
passed-in Name Value pairs object.
|
void |
setId(java.lang.String id)
Sets specific to this subsystem.
|
void |
shutdown()
Stops this system.
|
void |
startup()
Notifies this subsystem if owner is in running mode.
|
void |
updateCRL(java.security.cert.X509CRL crl)
This method updates the specified CRL.
|
void |
updateCRLHash(netscape.security.x509.X509CertImpl caCert,
netscape.security.x509.X509CRLImpl crl) |
com.netscape.cmsutil.ocsp.OCSPResponse |
validate(com.netscape.cmsutil.ocsp.OCSPRequest request)
Validate an OCSP request.
|
boolean |
waitOnCRLUpdate()
This method specifies whether or not to wait for the Certificate
Revocation List (CRL) to be updated.
|
public java.lang.String[] getExtendedPluginInfo(java.util.Locale locale)
IExtendedPluginInfo
getExtendedPluginInfo
in interface IExtendedPluginInfo
public void init(ISubsystem owner, IConfigStore config) throws EBaseException
init
in interface ISubsystem
owner
- owner of this subsystemconfig
- configuration storeEBaseException
- failed to initializepublic netscape.security.x509.X509CertImpl locateCACert(netscape.ldap.LDAPConnection conn, java.lang.String baseDN) throws EBaseException
EBaseException
public netscape.security.x509.X509CRLImpl locateCRL(netscape.ldap.LDAPConnection conn, java.lang.String baseDN) throws EBaseException
EBaseException
public void updateCRLHash(netscape.security.x509.X509CertImpl caCert, netscape.security.x509.X509CRLImpl crl) throws EBaseException
EBaseException
public void log(int level, java.lang.String msg)
public void startup() throws EBaseException
ISubsystem
startup
in interface ISubsystem
EBaseException
- failed to start uppublic void shutdown()
ISubsystem
shutdown
in interface ISubsystem
public IConfigStore getConfigStore()
ISubsystem
getConfigStore
in interface ISubsystem
public void setId(java.lang.String id) throws EBaseException
ISubsystem
setId
in interface ISubsystem
id
- subsystem identifierEBaseException
- failed to set idpublic java.lang.String getId()
ISubsystem
getId
in interface ISubsystem
public com.netscape.cmsutil.ocsp.OCSPResponse validate(com.netscape.cmsutil.ocsp.OCSPRequest request) throws EBaseException
validate
in interface IOCSPStore
request
- an OCSP requestEBaseException
- an error associated with the inability to
process the supplied OCSP requestpublic int getStateCount()
IDefStore
getStateCount
in interface IDefStore
public long getReqCount(java.lang.String id)
IDefStore
getReqCount
in interface IDefStore
id
- a string associated with an OCSP requestpublic IRepositoryRecord createRepositoryRecord()
IDefStore
createRepositoryRecord
in interface IDefStore
public void addRepository(java.lang.String name, java.lang.String thisUpdate, IRepositoryRecord rec) throws EBaseException
IDefStore
addRepository
in interface IDefStore
name
- a string representing the name of this requestthisUpdate
- the current requestrec
- an instance of the repository record objectEBaseException
- occurs when there is an error attempting to
add this request to the repositorypublic boolean waitOnCRLUpdate()
IDefStore
waitOnCRLUpdate
in interface IDefStore
public void updateCRL(java.security.cert.X509CRL crl) throws EBaseException
IDefStore
updateCRL
in interface IDefStore
crl
- the CRL to be updatedEBaseException
- occurs when the CRL cannot be updatedpublic ICRLIssuingPointRecord readCRLIssuingPoint(java.lang.String name) throws EBaseException
IDefStore
readCRLIssuingPoint
in interface IDefStore
name
- the name of the CRL to be readEBaseException
- occurs when the specified CRL cannot be locatedpublic java.util.Enumeration searchAllCRLIssuingPointRecord(int maxSize) throws EBaseException
IDefStore
searchAllCRLIssuingPointRecord
in interface IDefStore
maxSize
- specifies the largest number of hits from the searchEBaseException
- occurs when no CRL issuing point existspublic java.util.Enumeration searchCRLIssuingPointRecord(java.lang.String filter, int maxSize) throws EBaseException
IDefStore
searchCRLIssuingPointRecord
in interface IDefStore
filter
- a string which constrains the searchmaxSize
- specifies the largest number of hits from the searchEBaseException
- occurs when no CRL issuing point existspublic ICRLIssuingPointRecord createCRLIssuingPointRecord(java.lang.String name, java.math.BigInteger crlNumber, java.lang.Long crlSize, java.util.Date thisUpdate, java.util.Date nextUpdate)
IDefStore
createCRLIssuingPointRecord
in interface IDefStore
name
- a string representation of this CRL issuing point recordcrlNumber
- the number of this CRL issuing point recordcrlSize
- the size of this CRL issuing point recordthisUpdate
- the time for this CRL issuing point recordnextUpdate
- the time for the next CRL issuing point recordpublic void addCRLIssuingPoint(java.lang.String name, ICRLIssuingPointRecord rec) throws EBaseException
IDefStore
addCRLIssuingPoint
in interface IDefStore
name
- a string representation of this CRL issuing point recordrec
- this CRL issuing point recordEBaseException
- occurs when the specified CRL issuing point
record cannot be addedpublic void deleteCRLIssuingPointRecord(java.lang.String id) throws EBaseException
IDefStore
deleteCRLIssuingPointRecord
in interface IDefStore
id
- a string representation of this CRL issuing point recordEBaseException
- occurs when the specified CRL issuing point
record cannot be deletedpublic boolean isNotFoundGood()
IDefStore
isNotFoundGood
in interface IDefStore
public boolean includeNextUpdate() throws EBaseException
EBaseException
public boolean isNotFoundGood1() throws EBaseException
EBaseException
public void incReqCount(java.lang.String id)
public NameValuePairs getConfigParameters()
getConfigParameters
in interface IOCSPStore
public void setConfigParameters(NameValuePairs pairs) throws EBaseException
IOCSPStore
setConfigParameters
in interface IOCSPStore
pairs
- a name-value pair objectEBaseException
- an illegal name-value pair