public class LDAPStore extends java.lang.Object implements IDefStore, IExtendedPluginInfo
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Hashtable<java.lang.String,java.lang.Long> |
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<ICRLIssuingPointRecord> |
searchAllCRLIssuingPointRecord(int maxSize)
This method searches all CRL issuing points.
|
java.util.Enumeration<ICRLIssuingPointRecord> |
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) |
OCSPResponse |
validate(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)
IExtendedPluginInfogetExtendedPluginInfo in interface IExtendedPluginInfopublic void init(ISubsystem owner, IConfigStore config) throws EBaseException
init in interface ISubsystemowner - owner of this subsystemconfig - configuration storeEBaseException - failed to initializepublic netscape.security.x509.X509CertImpl locateCACert(netscape.ldap.LDAPConnection conn,
java.lang.String baseDN)
throws EBaseException
EBaseExceptionpublic netscape.security.x509.X509CRLImpl locateCRL(netscape.ldap.LDAPConnection conn,
java.lang.String baseDN)
throws EBaseException
EBaseExceptionpublic void updateCRLHash(netscape.security.x509.X509CertImpl caCert,
netscape.security.x509.X509CRLImpl crl)
throws EBaseException
EBaseExceptionpublic void log(int level,
java.lang.String msg)
public void startup()
throws EBaseException
ISubsystemstartup in interface ISubsystemEBaseException - failed to start uppublic void shutdown()
ISubsystemshutdown in interface ISubsystempublic IConfigStore getConfigStore()
ISubsystemgetConfigStore in interface ISubsystempublic void setId(java.lang.String id)
throws EBaseException
ISubsystemsetId in interface ISubsystemid - subsystem identifierEBaseException - failed to set idpublic java.lang.String getId()
ISubsystemgetId in interface ISubsystempublic OCSPResponse validate(OCSPRequest request) throws EBaseException
validate in interface IOCSPStorerequest - an OCSP requestEBaseException - an error associated with the inability to
process the supplied OCSP requestpublic int getStateCount()
IDefStoregetStateCount in interface IDefStorepublic long getReqCount(java.lang.String id)
IDefStoregetReqCount in interface IDefStoreid - a string associated with an OCSP requestpublic IRepositoryRecord createRepositoryRecord()
IDefStorecreateRepositoryRecord in interface IDefStorepublic void addRepository(java.lang.String name,
java.lang.String thisUpdate,
IRepositoryRecord rec)
throws EBaseException
IDefStoreaddRepository in interface IDefStorename - 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()
IDefStorewaitOnCRLUpdate in interface IDefStorepublic void updateCRL(java.security.cert.X509CRL crl)
throws EBaseException
IDefStoreupdateCRL in interface IDefStorecrl - the CRL to be updatedEBaseException - occurs when the CRL cannot be updatedpublic ICRLIssuingPointRecord readCRLIssuingPoint(java.lang.String name) throws EBaseException
IDefStorereadCRLIssuingPoint in interface IDefStorename - the name of the CRL to be readEBaseException - occurs when the specified CRL cannot be locatedpublic java.util.Enumeration<ICRLIssuingPointRecord> searchAllCRLIssuingPointRecord(int maxSize) throws EBaseException
IDefStoresearchAllCRLIssuingPointRecord in interface IDefStoremaxSize - specifies the largest number of hits from the searchEBaseException - occurs when no CRL issuing point existspublic java.util.Enumeration<ICRLIssuingPointRecord> searchCRLIssuingPointRecord(java.lang.String filter, int maxSize) throws EBaseException
IDefStoresearchCRLIssuingPointRecord in interface IDefStorefilter - 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)
IDefStorecreateCRLIssuingPointRecord in interface IDefStorename - 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
IDefStoreaddCRLIssuingPoint in interface IDefStorename - 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
IDefStoredeleteCRLIssuingPointRecord in interface IDefStoreid - a string representation of this CRL issuing point recordEBaseException - occurs when the specified CRL issuing point
record cannot be deletedpublic boolean isNotFoundGood()
IDefStoreisNotFoundGood in interface IDefStorepublic boolean includeNextUpdate()
throws EBaseException
EBaseExceptionpublic boolean isNotFoundGood1()
throws EBaseException
EBaseExceptionpublic void incReqCount(java.lang.String id)
public NameValuePairs getConfigParameters()
getConfigParameters in interface IOCSPStorepublic void setConfigParameters(NameValuePairs pairs) throws EBaseException
IOCSPStoresetConfigParameters in interface IOCSPStorepairs - a name-value pair objectEBaseException - an illegal name-value pair