public class DefStore extends java.lang.Object implements IDefStore, IExtendedPluginInfo
| Modifier and Type | Field and Description |
|---|---|
static java.math.BigInteger |
BIG_ZERO |
protected boolean |
mByName |
protected java.util.Hashtable<java.lang.String,com.netscape.cms.ocsp.CRLIPContainer> |
mCacheCRLIssuingPoints |
protected boolean |
mIncludeNextUpdate |
static java.lang.Long |
MINUS_ONE |
protected boolean |
mNotFoundGood |
protected java.util.Hashtable<java.lang.String,java.lang.Long> |
mReqCounts |
protected boolean |
mUseCache |
HELP_TEXT, HELP_TOKEN| Constructor and Description |
|---|
DefStore()
Constructs the default store.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCertRecord(java.lang.String name,
java.lang.String thisUpdate,
java.lang.String sno,
ICertRecord rec)
Creates a new issuing point in OCSP.
|
void |
addCRLIssuingPoint(java.lang.String name,
ICRLIssuingPointRecord rec)
Creates a new issuing point in OCSP.
|
void |
addRepository(java.lang.String name,
java.lang.String thisUpdate,
IRepositoryRecord rec)
Creates a new issuing point in OCSP.
|
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 |
deleteAllCRLsInCA(java.lang.String caName) |
void |
deleteCRLIssuingPointRecord(java.lang.String id)
This method deletes a CRL issuing point record
|
void |
deleteCRLsInCA(java.lang.String caName,
boolean oldCRLs) |
void |
deleteOldCRLs()
This store will not delete the old CRL until the
new one is totally committed.
|
void |
deleteOldCRLsInCA(java.lang.String caName) |
java.lang.String |
getBaseDN() |
NameValuePairs |
getConfigParameters()
This method retrieves the configuration parameters associated with this
OCSP store.
|
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)
Initializes this subsystem with the given configuration
store.
|
boolean |
isNotFoundGood()
This method checks to see if the OCSP response should return good
when the certificate is not found.
|
void |
log(int event,
int level,
java.lang.String msg) |
void |
log(int level,
java.lang.String msg) |
void |
modifyCertRecord(java.lang.String name,
java.lang.String thisUpdate,
java.lang.String sno,
ModificationSet mods) |
void |
modifyCRLIssuingPointRecord(java.lang.String name,
ModificationSet mods) |
ICertRecord |
readCertRecord(java.lang.String name,
java.lang.String thisUpdate,
java.lang.String sno) |
ICRLIssuingPointRecord |
readCRLIssuingPoint(java.lang.String name)
Returns an issuing point.
|
java.util.Enumeration<ICRLIssuingPointRecord> |
searchAllCRLIssuingPointRecord(int maxSize)
This method searches all CRL issuing points.
|
java.util.Enumeration<ICertRecord> |
searchCertRecord(java.lang.String name,
java.lang.String thisUpdate,
java.lang.String filter) |
java.util.Enumeration<ICRLIssuingPointRecord> |
searchCRLIssuingPointRecord(java.lang.String filter,
int maxSize)
This method searches all CRL issuing points constrained by the specified
filtering mechanism.
|
java.util.Enumeration<IRepositoryRecord> |
searchRepository(java.lang.String name,
java.lang.String filter) |
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.
|
OCSPResponse |
validate(OCSPRequest request)
Validate an OCSP request.
|
boolean |
waitOnCRLUpdate()
Returns to the client once the CRL is received.
|
public static final java.math.BigInteger BIG_ZERO
public static final java.lang.Long MINUS_ONE
protected java.util.Hashtable<java.lang.String,java.lang.Long> mReqCounts
protected boolean mNotFoundGood
protected boolean mUseCache
protected boolean mByName
protected boolean mIncludeNextUpdate
protected java.util.Hashtable<java.lang.String,com.netscape.cms.ocsp.CRLIPContainer> mCacheCRLIssuingPoints
public java.lang.String[] getExtendedPluginInfo(java.util.Locale locale)
IExtendedPluginInfogetExtendedPluginInfo in interface IExtendedPluginInfopublic void init(ISubsystem owner, IConfigStore config) throws EBaseException
ISubsysteminit in interface ISubsystemowner - owner of this subsystemconfig - configuration storeEBaseException - failed to initializepublic IRepositoryRecord createRepositoryRecord()
IDefStorecreateRepositoryRecord in interface IDefStorepublic boolean waitOnCRLUpdate()
waitOnCRLUpdate in interface IDefStorepublic boolean includeNextUpdate()
public boolean isNotFoundGood()
IDefStoreisNotFoundGood in interface IDefStorepublic long getReqCount(java.lang.String id)
IDefStoregetReqCount in interface IDefStoreid - a string associated with an OCSP requestpublic void incReqCount(java.lang.String id)
public void deleteOldCRLs()
throws EBaseException
EBaseExceptionpublic void deleteOldCRLsInCA(java.lang.String caName)
throws EBaseException
EBaseExceptionpublic void deleteAllCRLsInCA(java.lang.String caName)
throws EBaseException
EBaseExceptionpublic void deleteCRLsInCA(java.lang.String caName,
boolean oldCRLs)
throws EBaseException
EBaseExceptionpublic void log(int event,
int level,
java.lang.String msg)
public 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 java.lang.String getBaseDN()
public 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 void modifyCRLIssuingPointRecord(java.lang.String name,
ModificationSet mods)
throws EBaseException
EBaseExceptionpublic ICRLIssuingPointRecord readCRLIssuingPoint(java.lang.String name) throws EBaseException
readCRLIssuingPoint in interface IDefStorename - the name of the CRL to be readEBaseException - occurs when the specified CRL cannot be locatedpublic 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 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 void addCRLIssuingPoint(java.lang.String name,
ICRLIssuingPointRecord rec)
throws EBaseException
addCRLIssuingPoint 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 java.util.Enumeration<IRepositoryRecord> searchRepository(java.lang.String name, java.lang.String filter) throws EBaseException
EBaseExceptionpublic void addRepository(java.lang.String name,
java.lang.String thisUpdate,
IRepositoryRecord rec)
throws EBaseException
addRepository 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 void modifyCertRecord(java.lang.String name,
java.lang.String thisUpdate,
java.lang.String sno,
ModificationSet mods)
throws EBaseException
EBaseExceptionpublic java.util.Enumeration<ICertRecord> searchCertRecord(java.lang.String name, java.lang.String thisUpdate, java.lang.String filter) throws EBaseException
EBaseExceptionpublic ICertRecord readCertRecord(java.lang.String name, java.lang.String thisUpdate, java.lang.String sno) throws EBaseException
EBaseExceptionpublic void addCertRecord(java.lang.String name,
java.lang.String thisUpdate,
java.lang.String sno,
ICertRecord rec)
throws EBaseException
EBaseExceptionpublic NameValuePairs getConfigParameters()
IOCSPStoregetConfigParameters in interface IOCSPStorepublic void setConfigParameters(NameValuePairs pairs) throws EBaseException
IOCSPStoresetConfigParameters in interface IOCSPStorepairs - a name-value pair objectEBaseException - an illegal name-value pairpublic 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 int getStateCount()
IDefStoregetStateCount in interface IDefStore