Package com.netscape.cmscore.dbs
Class CRLRepository
- java.lang.Object
-
- com.netscape.cmscore.dbs.Repository
-
- com.netscape.cmscore.dbs.CRLRepository
-
- All Implemented Interfaces:
ICRLRepository,IRepository
public class CRLRepository extends Repository implements ICRLRepository
A class represents a CRL repository. It stores all the CRL issuing points.- Version:
- $Revision$, $Date$
- Author:
- thomask
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Loggerlogger-
Fields inherited from class com.netscape.cmscore.dbs.Repository
mCounter, mEnableRandomSerialNumbers, mMaxSerialNo, mMinSerialNo
-
-
Constructor Summary
Constructors Constructor Description CRLRepository(IDBSubsystem dbService, int increment, java.lang.String baseDN)Constructs a CRL repository.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCRLIssuingPointRecord(ICRLIssuingPointRecord rec)Adds CRL issuing points.voiddeleteCRLIssuingPointRecord(java.lang.String id)deletes issuing point record.IDBSubsystemgetDBSubsystem()Retrieves backend database handle.java.lang.StringgetDN()Retrieves DN of this repository.java.util.Vector<java.lang.String>getIssuingPointsNames()Retrieves all issuing points' namesjava.math.BigIntegergetLastSerialNumberInRange(java.math.BigInteger serial_low_bound, java.math.BigInteger serial_upper_bound)voidmodifyCRLIssuingPointRecord(java.lang.String id, ModificationSet mods)Modifies issuing point record.ICRLIssuingPointRecordreadCRLIssuingPointRecord(java.lang.String id)Reads issuing point record.voidremoveAllObjects()Removes all objects with this repository.voidupdateCRLCache(java.lang.String id, java.lang.Long crlSize, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts)Updates CRL issuing point record with CRL cache info.voidupdateCRLIssuingPointRecord(java.lang.String id, byte[] newCRL, java.util.Date thisUpdate, java.util.Date nextUpdate, java.math.BigInteger crlNumber, java.lang.Long crlSize)Updates CRL issuing point record.voidupdateCRLIssuingPointRecord(java.lang.String id, byte[] newCRL, java.util.Date thisUpdate, java.util.Date nextUpdate, java.math.BigInteger crlNumber, java.lang.Long crlSize, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts)Updates CRL issuing point record.voidupdateDeltaCRL(java.lang.String id, java.math.BigInteger deltaCRLNumber, java.lang.Long deltaCRLSize, java.util.Date nextUpdate, byte[] deltaCRL)Updates CRL issuing point record with delta-CRL.voidupdateExpiredCerts(java.lang.String id, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts)Updates CRL issuing point record with recently expired certificates info.voidupdateFirstUnsaved(java.lang.String id, java.lang.String firstUnsaved)Updates CRL issuing point record with reference to the first unsaved data.voidupdateRevokedCerts(java.lang.String id, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts)Updates CRL issuing point record with recently revoked certificates info.-
Methods inherited from class com.netscape.cmscore.dbs.Repository
checkRange, checkRanges, getMaxSerial, getMinSerial, getNextMaxSerial, getNextSerialNumber, getSerialNumber, initCacheIfNeeded, peekNextSerialNumber, resetSerialNumber, setEnableSerialMgmt, setLastSerialNo, setMaxSerial, setNextMaxSerial, setSerialNumber, setTheSerialNumber
-
-
-
-
Constructor Detail
-
CRLRepository
public CRLRepository(IDBSubsystem dbService, int increment, java.lang.String baseDN) throws EDBException
Constructs a CRL repository.- Throws:
EDBException
-
-
Method Detail
-
getDBSubsystem
public IDBSubsystem getDBSubsystem()
Retrieves backend database handle.
-
getDN
public java.lang.String getDN()
Retrieves DN of this repository.
-
removeAllObjects
public void removeAllObjects() throws EBaseExceptionRemoves all objects with this repository.- Throws:
EBaseException
-
addCRLIssuingPointRecord
public void addCRLIssuingPointRecord(ICRLIssuingPointRecord rec) throws EBaseException
Adds CRL issuing points.- Specified by:
addCRLIssuingPointRecordin interfaceICRLRepository- Parameters:
rec- issuing point record- Throws:
EBaseException- failed to add new issuing point record
-
getIssuingPointsNames
public java.util.Vector<java.lang.String> getIssuingPointsNames() throws EBaseExceptionRetrieves all issuing points' names- Specified by:
getIssuingPointsNamesin interfaceICRLRepository- Returns:
- A list of issuing points' names.
- Throws:
EBaseException- failed to retrieve all the issuing points' names.
-
readCRLIssuingPointRecord
public ICRLIssuingPointRecord readCRLIssuingPointRecord(java.lang.String id) throws EBaseException
Reads issuing point record.- Specified by:
readCRLIssuingPointRecordin interfaceICRLRepository- Returns:
- issuing point record
- Throws:
EBaseException- failed to read issuing point record
-
deleteCRLIssuingPointRecord
public void deleteCRLIssuingPointRecord(java.lang.String id) throws EBaseExceptiondeletes issuing point record.- Specified by:
deleteCRLIssuingPointRecordin interfaceICRLRepository- Parameters:
id- issuing point record id- Throws:
EBaseException- failed to delete issuing point record
-
modifyCRLIssuingPointRecord
public void modifyCRLIssuingPointRecord(java.lang.String id, ModificationSet mods) throws EBaseExceptionDescription copied from interface:ICRLRepositoryModifies issuing point record.- Specified by:
modifyCRLIssuingPointRecordin interfaceICRLRepository- Parameters:
id- issuing point record idmods- set of modifications- Throws:
EBaseException- failed to modify issuing point record
-
updateCRLIssuingPointRecord
public void updateCRLIssuingPointRecord(java.lang.String id, byte[] newCRL, java.util.Date thisUpdate, java.util.Date nextUpdate, java.math.BigInteger crlNumber, java.lang.Long crlSize) throws EBaseExceptionUpdates CRL issuing point record.- Specified by:
updateCRLIssuingPointRecordin interfaceICRLRepository- Parameters:
id- issuing point record idnewCRL- encoded binary CRLthisUpdate- time of this updatenextUpdate- time of next updatecrlNumber- CRL numbercrlSize- CRL size- Throws:
EBaseException- failed to update issuing point record
-
updateCRLIssuingPointRecord
public void updateCRLIssuingPointRecord(java.lang.String id, byte[] newCRL, java.util.Date thisUpdate, java.util.Date nextUpdate, java.math.BigInteger crlNumber, java.lang.Long crlSize, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts) throws EBaseExceptionUpdates CRL issuing point record.- Specified by:
updateCRLIssuingPointRecordin interfaceICRLRepository- Parameters:
id- issuing point record idnewCRL- encoded binary CRLthisUpdate- time of this updatenextUpdate- time of next updatecrlNumber- CRL numbercrlSize- CRL sizerevokedCerts- list of revoked certificatesunrevokedCerts- list of released from hold certificatesexpiredCerts- list of expired certificates- Throws:
EBaseException- failed to update issuing point record
-
updateRevokedCerts
public void updateRevokedCerts(java.lang.String id, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts) throws EBaseExceptionUpdates CRL issuing point record with recently revoked certificates info.- Specified by:
updateRevokedCertsin interfaceICRLRepository- Parameters:
id- issuing point record idrevokedCerts- list of revoked certificatesunrevokedCerts- list of released from hold certificates- Throws:
EBaseException- failed to update issuing point record
-
updateExpiredCerts
public void updateExpiredCerts(java.lang.String id, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts) throws EBaseExceptionUpdates CRL issuing point record with recently expired certificates info.- Specified by:
updateExpiredCertsin interfaceICRLRepository- Parameters:
id- issuing point record idexpiredCerts- list of expired certificates- Throws:
EBaseException- failed to update issuing point record
-
updateCRLCache
public void updateCRLCache(java.lang.String id, java.lang.Long crlSize, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> revokedCerts, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> unrevokedCerts, java.util.Hashtable<java.math.BigInteger,org.mozilla.jss.netscape.security.x509.RevokedCertificate> expiredCerts) throws EBaseExceptionUpdates CRL issuing point record with CRL cache info.- Specified by:
updateCRLCachein interfaceICRLRepository- Parameters:
id- issuing point record idcrlSize- CRL sizerevokedCerts- list of revoked certificatesunrevokedCerts- list of released from hold certificatesexpiredCerts- list of expired certificates- Throws:
EBaseException- failed to update issuing point record
-
updateDeltaCRL
public void updateDeltaCRL(java.lang.String id, java.math.BigInteger deltaCRLNumber, java.lang.Long deltaCRLSize, java.util.Date nextUpdate, byte[] deltaCRL) throws EBaseExceptionUpdates CRL issuing point record with delta-CRL.- Specified by:
updateDeltaCRLin interfaceICRLRepository- Parameters:
id- issuing point record iddeltaCRLNumber- delta CRL numberdeltaCRLSize- delta CRL sizenextUpdate- time of next updatedeltaCRL- delta CRL in binary form- Throws:
EBaseException- failed to update issuing point record
-
updateFirstUnsaved
public void updateFirstUnsaved(java.lang.String id, java.lang.String firstUnsaved) throws EBaseExceptionDescription copied from interface:ICRLRepositoryUpdates CRL issuing point record with reference to the first unsaved data.- Specified by:
updateFirstUnsavedin interfaceICRLRepository- Parameters:
id- issuing point record idfirstUnsaved- reference to the first unsaved data- Throws:
EBaseException- failed to update issuing point record
-
getLastSerialNumberInRange
public java.math.BigInteger getLastSerialNumberInRange(java.math.BigInteger serial_low_bound, java.math.BigInteger serial_upper_bound) throws EBaseException- Specified by:
getLastSerialNumberInRangein classRepository- Throws:
EBaseException
-
-