Package com.netscape.cmscore.dbs
Class CertificateRepository
- java.lang.Object
-
- com.netscape.cmscore.dbs.Repository
-
- com.netscape.cmscore.dbs.CertificateRepository
-
- All Implemented Interfaces:
IRepository
public class CertificateRepository extends Repository
A classrepresents a certificate repository. It stores all the issued certificate.- Version:
- $Revision$, $Date$
- Author:
- thomask, kanda
-
-
Field Summary
Fields Modifier and Type Field Description static intALL_CERTSstatic intALL_UNREVOKED_CERTSstatic intALL_VALID_CERTSjava.lang.StringCERT_X509ATTRIBUTEstatic org.slf4j.Loggerloggerstatic java.lang.StringPROP_INCREMENTstatic java.lang.StringPROP_TRANS_MAXRECORDSstatic java.lang.StringPROP_TRANS_PAGESIZE-
Fields inherited from class com.netscape.cmscore.dbs.Repository
dbSubsystem, maxSerialName, mBaseDN, mCounter, mEnableRandomSerialNumbers, mIncrementNo, minSerialName, mLowWaterMarkNo, mMaxSerialNo, mMinSerialNo, mNextMaxSerialNo, mNextMinSerialNo, mRadix, nextMaxSerialName, nextMinSerialName, rangeDN, repositoryConfig
-
-
Constructor Summary
Constructors Constructor Description CertificateRepository(DBSubsystem dbSubsystem)Constructs a certificate repository.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddCertificateRecord(CertRecord record)Adds a certificate record to the repository.voidaddRevokedCertRecord(CertRecord record)Used by the Clone Master (CLA) to add a revoked certificate record to the repository.booleancheckCertificateRecord(java.math.BigInteger serialNo)booleancontainsCertificate(java.math.BigInteger serialNo)Checks if the certificate exists in this repository.CertRecordcreateCertRecord(RequestId requestID, java.lang.String profileIDMapping, org.mozilla.jss.netscape.security.x509.X509CertImpl cert)voiddeleteCertificateRecord(java.math.BigInteger serialNo)Deletes certificate from this repository.java.util.Enumeration<org.mozilla.jss.netscape.security.x509.X509CertImpl>findCertificates(java.lang.String filter)Finds all certificates given a filter.java.util.Enumeration<CertRecord>findCertRecords(java.lang.String filter)Finds a list of certificate records that satisifies the filter.CertRecordListfindCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, int pageSize)Finds certificate records.CertRecordListfindCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, java.lang.String jumpTo, boolean hardJumpTo, java.lang.String sortKey, int pageSize)Finds a list of certificate records that satisifies the filter.CertRecordListfindCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, java.lang.String sortKey, int pageSize)Finds a list of certificate records that satisifies the filter.CertRecordListfindCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, java.lang.String jumpTo, java.lang.String sortKey, int pageSize)Finds a list of certificate records that satisifies the filter.CertRecordListfindCertRecordsInListRawJumpto(java.lang.String filter, java.lang.String[] attrs, java.lang.String jumpTo, java.lang.String sortKey, int pageSize)Finds a list of certificate records that satisifies the filter.java.util.Enumeration<java.lang.Object>findCertRecs(java.lang.String filter)Deprecated.replaced byfindCertificatesInListjava.util.Enumeration<java.lang.Object>findCertRecs(java.lang.String filter, java.lang.String[] attrs)java.util.Enumeration<CertRecord>getAllExpiredCertificates()Retrives all expired certificates.java.util.Enumeration<CertRecord>getAllExpiredPublishedCertificates()Retrives all expired publishedcertificates.java.util.Enumeration<CertRecord>getAllRevokedCertificates()Retrieves all revoked certificates including ones that have expired or that are not yet valid.java.util.Enumeration<CertRecord>getAllRevokedNonExpiredCertificates()Retrieves all revoked but not expired certificates.java.util.Enumeration<CertRecord>getAllRevokedPublishedCertificates()Retrives all revoked published certificates including ones already expired or not yet valid.java.util.Enumeration<CertRecord>getAllValidCertificates()Retrives all valid certificates excluding ones already revoked.java.util.Enumeration<CertRecord>getAllValidNotPublishedCertificates()Retrives all valid not published certificates excluding ones already revoked.booleangetEnableRandomSerialNumbers()Retrieves serial number management mode.java.util.Enumeration<CertRecord>getExpiredCertificates(java.lang.String from, java.lang.String to)Retrieves expired certificates.java.util.Enumeration<CertRecord>getExpiredPublishedCertificates(java.lang.String from, java.lang.String to)Retrieves expired and published certificates.CertRecordListgetInvalidCertsByNotBeforeDate(java.util.Date date, int pageSize)Gets Invalid certs orderes by noAfter date, jumps to records where notAfter date is greater than current.java.math.BigIntegergetLastSerialNumberInRange(java.math.BigInteger serial_low_bound, java.math.BigInteger serial_upper_bound)java.math.BigIntegergetNextSerialNumber()Retrieves the next certificate serial number, and also increases the serial number by one.java.util.Hashtable<java.lang.String,RenewableCertificateCollection>getRenewableCertificates(java.lang.String renewalTime)Retrieves renewable certificates.java.util.Enumeration<CertRecord>getRevokedCertificates(java.lang.String from, java.lang.String to)Retrieves revoked certificates.java.util.Enumeration<CertRecord>getRevokedCertificates(java.util.Date asOfDate)Retrieves all revoked certificates that have not expired.CertRecordListgetRevokedCertsByNotAfterDate(java.util.Date date, int pageSize)Gets Revoked certs orderes by noAfter date, jumps to records where notAfter date is greater than current.java.util.Enumeration<CertRecord>getRevokedPublishedCertificates(java.lang.String from, java.lang.String to)Retrieves revoked and published certificates.java.util.Enumeration<CertRecord>getValidCertificates(java.lang.String from, java.lang.String to)Retrieves valid certificates.CertRecordListgetValidCertsByNotAfterDate(java.util.Date date, int pageSize)Gets valid certs orderes by noAfter date, jumps to records where notAfter date is greater than current.java.util.Enumeration<CertRecord>getValidNotPublishedCertificates(java.lang.String from, java.lang.String to)Retrieves valid and not published certificates.org.mozilla.jss.netscape.security.x509.X509CertImplgetX509Certificate(java.math.BigInteger serialNo)Reads the certificate identified by the given serial no.org.mozilla.jss.netscape.security.x509.X509CertImpl[]getX509Certificates(java.lang.String filter)org.mozilla.jss.netscape.security.x509.X509CertImpl[]getX509Certificates(java.lang.String subjectDN, int validityType)Gets all valid and unexpired certificates pertaining to a subject DN.RevocationInfoisCertificateRevoked(org.mozilla.jss.netscape.security.x509.X509CertImpl cert)Checks if the presented certificate belongs to the repository and is revoked.voidmarkAsRevoked(java.math.BigInteger id, IRevocationInfo info)Marks certificate as revoked.voidmarkAsRevoked(java.math.BigInteger id, IRevocationInfo info, boolean isAlreadyRevoked)Marks certificate as revoked.voidmarkCertificateAsNotRenewable(CertRecord record)Marks certificate as not renewable.voidmarkCertificateAsRenewable(CertRecord record)Marks certificate as renewable.voidmarkCertificateAsRenewalNotified(java.lang.String serialNo)Marks certificate as renewed and notified.voidmarkCertificateAsRenewed(java.lang.String serialNo)Marks certificate as renewed.voidmodifyCertificateRecord(java.math.BigInteger serialNo, ModificationSet mods)Modifies certificate record.CertRecordreadCertificateRecord(java.math.BigInteger serialNo)Reads certificate from repository.voidremoveCertRecords(java.math.BigInteger beginS, java.math.BigInteger endS)Removes certificate records with this repository.java.util.Enumeration<java.lang.Object>searchCertificates(java.lang.String filter, int maxSize)Finds a list of certificate records that satisifies the filter.java.util.Enumeration<CertRecord>searchCertificates(java.lang.String filter, int maxSize, int timeLimit)Finds a list of certificate records that satisifies the filter.java.util.Enumeration<CertRecord>searchCertificates(java.lang.String filter, int maxSize, int timeLimit, java.lang.String sortAttribute)Finds a list of certificate records that satisifies the filter.java.util.Enumeration<java.lang.Object>searchCertificates(java.lang.String filter, int maxSize, java.lang.String sortAttribute)Finds a list of certificate records that satisifies the filter.voidsetConsistencyCheck(boolean ConsistencyCheck)voidsetEnableRandomSerialNumbers(boolean random, boolean updateMode, boolean forceModeChange)Sets serial number management mode for certificates..voidshutdown()voidunmarkRevoked(java.math.BigInteger id, IRevocationInfo info, java.util.Date revokedOn, java.lang.String revokedBy)Unmark a revoked certificates.voidupdateCounter()voidupdateStatus(java.math.BigInteger id, java.lang.String status)Updates certificate status.voidupdateStatus(java.util.Vector<java.math.BigInteger> list, java.lang.String status)-
Methods inherited from class com.netscape.cmscore.dbs.Repository
checkRange, checkRanges, getBaseDN, getMaxSerial, getMinSerial, getNextMaxSerial, getNextRange, getRadix, hasRangeConflict, initCacheIfNeeded, peekNextSerialNumber, setEnableSerialMgmt, setLastSerialNo, setMaxSerial, setMaxSerialConfig, setMinSerialConfig, setNextMaxSerial, setNextMaxSerialConfig, setNextMinSerialConfig, setTheSerialNumber
-
-
-
-
Field Detail
-
logger
public static org.slf4j.Logger logger
-
ALL_CERTS
public static final int ALL_CERTS
- See Also:
- Constant Field Values
-
ALL_VALID_CERTS
public static final int ALL_VALID_CERTS
- See Also:
- Constant Field Values
-
ALL_UNREVOKED_CERTS
public static final int ALL_UNREVOKED_CERTS
- See Also:
- Constant Field Values
-
PROP_INCREMENT
public static final java.lang.String PROP_INCREMENT
- See Also:
- Constant Field Values
-
PROP_TRANS_MAXRECORDS
public static final java.lang.String PROP_TRANS_MAXRECORDS
- See Also:
- Constant Field Values
-
PROP_TRANS_PAGESIZE
public static final java.lang.String PROP_TRANS_PAGESIZE
- See Also:
- Constant Field Values
-
CERT_X509ATTRIBUTE
public final java.lang.String CERT_X509ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CertificateRepository
public CertificateRepository(DBSubsystem dbSubsystem) throws EBaseException
Constructs a certificate repository.- Throws:
EBaseException
-
-
Method Detail
-
getEnableRandomSerialNumbers
public boolean getEnableRandomSerialNumbers()
Retrieves serial number management mode.- Returns:
- serial number management mode, "true" indicates random serial number management, "false" indicates sequential serial number management.
-
setEnableRandomSerialNumbers
public void setEnableRandomSerialNumbers(boolean random, boolean updateMode, boolean forceModeChange)Sets serial number management mode for certificates..- Parameters:
random- "true" sets random serial number management, "false" sequentialupdateMode- "true" updates "description" attribute in certificate repositoryforceModeChange- "true" forces certificate repository mode change
-
getNextSerialNumber
public java.math.BigInteger getNextSerialNumber() throws EBaseExceptionRetrieves the next certificate serial number, and also increases the serial number by one.- Specified by:
getNextSerialNumberin interfaceIRepository- Overrides:
getNextSerialNumberin classRepository- Returns:
- serial number
- Throws:
EBaseException- failed to retrieve next serial number
-
updateCounter
public void updateCounter()
-
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
-
removeCertRecords
public void removeCertRecords(java.math.BigInteger beginS, java.math.BigInteger endS) throws EBaseExceptionRemoves certificate records with this repository.- Parameters:
beginS- BigInteger with radix 16endS- BigInteger with radix 16- Throws:
EBaseException
-
setConsistencyCheck
public void setConsistencyCheck(boolean ConsistencyCheck)
-
createCertRecord
public CertRecord createCertRecord(RequestId requestID, java.lang.String profileIDMapping, org.mozilla.jss.netscape.security.x509.X509CertImpl cert) throws java.lang.Exception
- Throws:
java.lang.Exception
-
addCertificateRecord
public void addCertificateRecord(CertRecord record) throws EBaseException
Adds a certificate record to the repository. Each certificate record contains four parts: certificate, meta-attributes, issue information and revocation information.- Parameters:
record- X.509 certificate- Throws:
EBaseException- failed to add new certificate to the repository
-
addRevokedCertRecord
public void addRevokedCertRecord(CertRecord record) throws EBaseException
Used by the Clone Master (CLA) to add a revoked certificate record to the repository.- Parameters:
record- a CertRecord- Throws:
EBaseException- failed to add new certificate to the repository
-
updateStatus
public void updateStatus(java.util.Vector<java.math.BigInteger> list, java.lang.String status) throws EBaseException- Throws:
EBaseException
-
getX509Certificate
public org.mozilla.jss.netscape.security.x509.X509CertImpl getX509Certificate(java.math.BigInteger serialNo) throws EBaseExceptionReads the certificate identified by the given serial no.- Parameters:
serialNo- serial number of certificate- Returns:
- certificate
- Throws:
EBaseException- failed to retrieve certificate
-
deleteCertificateRecord
public void deleteCertificateRecord(java.math.BigInteger serialNo) throws EBaseExceptionDeletes certificate from this repository.- Parameters:
serialNo- serial number of certificate- Throws:
EBaseException- failed to delete
-
readCertificateRecord
public CertRecord readCertificateRecord(java.math.BigInteger serialNo) throws EBaseException
Reads certificate from repository.- Parameters:
serialNo- serial number of certificate- Returns:
- certificate record
- Throws:
EBaseException- failed to retrieve certificate
-
checkCertificateRecord
public boolean checkCertificateRecord(java.math.BigInteger serialNo) throws EBaseException- Throws:
EBaseException
-
modifyCertificateRecord
public void modifyCertificateRecord(java.math.BigInteger serialNo, ModificationSet mods) throws EBaseExceptionModifies certificate record.- Parameters:
serialNo- serial number of recordmods- modifications- Throws:
EBaseException- failed to modify
-
containsCertificate
public boolean containsCertificate(java.math.BigInteger serialNo) throws EBaseExceptionChecks if the certificate exists in this repository.- Parameters:
serialNo- serial number of certificate- Returns:
- true if it exists
- Throws:
EBaseException- failed to check
-
markAsRevoked
public void markAsRevoked(java.math.BigInteger id, IRevocationInfo info) throws EBaseExceptionMarks certificate as revoked. isAlreadyRevoked - boolean to indicate that the cert was revoked ( possibly onHold ) When a cert was originally revoked (possibly onHold), some of the ldap attributes already exist, so "MOD_REPLACE" is needed instead of "MOD_ADD"- Parameters:
id- serial numberinfo- revocation information- Throws:
EBaseException- failed to mark
-
markAsRevoked
public void markAsRevoked(java.math.BigInteger id, IRevocationInfo info, boolean isAlreadyRevoked) throws EBaseExceptionMarks certificate as revoked.- Parameters:
id- serial numberinfo- revocation informationisAlreadyRevoked- boolean to indicate if the cert was revoked onHold- Throws:
EBaseException- failed to mark
-
unmarkRevoked
public void unmarkRevoked(java.math.BigInteger id, IRevocationInfo info, java.util.Date revokedOn, java.lang.String revokedBy) throws EBaseExceptionUnmark a revoked certificates.- Parameters:
id- serial numberinfo- revocation informationrevokedOn- revocation daterevokedBy- userid- Throws:
EBaseException- failed to unmark
-
updateStatus
public void updateStatus(java.math.BigInteger id, java.lang.String status) throws EBaseExceptionUpdates certificate status.- Parameters:
id- serial numberstatus- certificate status- Throws:
EBaseException- failed to update status
-
searchCertificates
public java.util.Enumeration<java.lang.Object> searchCertificates(java.lang.String filter, int maxSize, java.lang.String sortAttribute) throws EBaseExceptionFinds a list of certificate records that satisifies the filter.- Parameters:
filter- search filtermaxSize- max size to returnsortAttribute- Attribute of CertRecord to sort the results- Returns:
- a list of certificates
- Throws:
EBaseException- failed to search
-
searchCertificates
public java.util.Enumeration<java.lang.Object> searchCertificates(java.lang.String filter, int maxSize) throws EBaseExceptionFinds a list of certificate records that satisifies the filter. Here is a list of filter attribute can be used:certRecordId certMetaInfo certStatus certCreateTime certModifyTime x509Cert.notBefore x509Cert.notAfter x509Cert.subject
The filter should follow RFC1558 LDAP filter syntax. For example,- Parameters:
filter- search filtermaxSize- max size to return- Returns:
- a list of certificates
- Throws:
EBaseException- failed to search
-
searchCertificates
public java.util.Enumeration<CertRecord> searchCertificates(java.lang.String filter, int maxSize, int timeLimit) throws EBaseException
Finds a list of certificate records that satisifies the filter.- Parameters:
filter- search filtermaxSize- max size to returntimeLimit- timeout value- Returns:
- a list of certificates
- Throws:
EBaseException- failed to search
-
searchCertificates
public java.util.Enumeration<CertRecord> searchCertificates(java.lang.String filter, int maxSize, int timeLimit, java.lang.String sortAttribute) throws EBaseException
Finds a list of certificate records that satisifies the filter.- Parameters:
filter- search filtermaxSize- max size to returntimeLimit- timeout valuesortAttribute- Attribute of CertRecord to sort the results- Returns:
- a list of certificates
- Throws:
EBaseException- failed to search
-
findCertRecs
@Deprecated public java.util.Enumeration<java.lang.Object> findCertRecs(java.lang.String filter) throws EBaseExceptionDeprecated.replaced byfindCertificatesInListFinds certificate records.- Parameters:
filter- search filter- Returns:
- a list of certificate records
- Throws:
EBaseException- failed to retrieve cert records
-
findCertRecs
public java.util.Enumeration<java.lang.Object> findCertRecs(java.lang.String filter, java.lang.String[] attrs) throws EBaseException- Throws:
EBaseException
-
findCertificates
public java.util.Enumeration<org.mozilla.jss.netscape.security.x509.X509CertImpl> findCertificates(java.lang.String filter) throws EBaseExceptionFinds all certificates given a filter.- Parameters:
filter- search filter- Returns:
- a list of certificates
- Throws:
EBaseException- failed to search
-
findCertRecords
public java.util.Enumeration<CertRecord> findCertRecords(java.lang.String filter) throws EBaseException
Finds a list of certificate records that satisifies the filter. If you are going to process everything in the list, use this.- Parameters:
filter- search filter- Returns:
- a list of certificates
- Throws:
EBaseException- failed to search
-
findCertRecordsInList
public CertRecordList findCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, int pageSize) throws EBaseException
Finds certificate records. Here is a list of filter attribute can be used:certRecordId certMetaInfo certStatus certCreateTime certModifyTime x509Cert.notBefore x509Cert.notAfter x509Cert.subject
The filter should follow RFC1558 LDAP filter syntax. For example,- Parameters:
filter- search filterattrs- selected attributepageSize- page size- Returns:
- a list of certificates
- Throws:
EBaseException- failed to search
-
findCertRecordsInList
public CertRecordList findCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, java.lang.String sortKey, int pageSize) throws EBaseException
Finds a list of certificate records that satisifies the filter.- Parameters:
filter- search filterattrs- selected attributesortKey- key to use for sorting the returned elementspageSize- page size- Returns:
- a list of certificates
- Throws:
EBaseException- failed to search
-
findCertRecordsInList
public CertRecordList findCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, java.lang.String jumpTo, java.lang.String sortKey, int pageSize) throws EBaseException
Finds a list of certificate records that satisifies the filter.- Parameters:
filter- search filterattrs- selected attributejumpTo- jump to indexsortKey- key to use for sorting the returned elementspageSize- page size- Returns:
- a list of certificates
- Throws:
EBaseException- failed to search
-
findCertRecordsInList
public CertRecordList findCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, java.lang.String jumpTo, boolean hardJumpTo, java.lang.String sortKey, int pageSize) throws EBaseException
Finds a list of certificate records that satisifies the filter.- Parameters:
filter- search filterattrs- selected attributejumpTo- jump to indexhardJumpTo-sortKey- key to use for sorting the returned elementspageSize- page size- Returns:
- a list of certificates
- Throws:
EBaseException- failed to search
-
findCertRecordsInListRawJumpto
public CertRecordList findCertRecordsInListRawJumpto(java.lang.String filter, java.lang.String[] attrs, java.lang.String jumpTo, java.lang.String sortKey, int pageSize) throws EBaseException
Finds a list of certificate records that satisifies the filter.- Parameters:
filter- search filterattrs- selected attributejumpTo- jump to indexsortKey- key to use for sorting the returned elementspageSize- page size- Returns:
- a list of certificates
- Throws:
EBaseException- failed to search
-
markCertificateAsRenewable
public void markCertificateAsRenewable(CertRecord record) throws EBaseException
Marks certificate as renewable.- Parameters:
record- certificate record to modify- Throws:
EBaseException- failed to update
-
markCertificateAsNotRenewable
public void markCertificateAsNotRenewable(CertRecord record) throws EBaseException
Marks certificate as not renewable.- Parameters:
record- certificate record to modify- Throws:
EBaseException- failed to update
-
markCertificateAsRenewed
public void markCertificateAsRenewed(java.lang.String serialNo) throws EBaseExceptionMarks certificate as renewed.- Parameters:
serialNo- certificate record to modify- Throws:
EBaseException- failed to update
-
markCertificateAsRenewalNotified
public void markCertificateAsRenewalNotified(java.lang.String serialNo) throws EBaseExceptionMarks certificate as renewed and notified.- Parameters:
serialNo- certificate record to modify- Throws:
EBaseException- failed to update
-
getRenewableCertificates
public java.util.Hashtable<java.lang.String,RenewableCertificateCollection> getRenewableCertificates(java.lang.String renewalTime) throws EBaseException
Retrieves renewable certificates.- Parameters:
renewalTime- renewal time- Returns:
- certificates
- Throws:
EBaseException- failed to retrieve
-
getX509Certificates
public org.mozilla.jss.netscape.security.x509.X509CertImpl[] getX509Certificates(java.lang.String subjectDN, int validityType) throws EBaseExceptionGets all valid and unexpired certificates pertaining to a subject DN.- Parameters:
subjectDN- The distinguished name of the subject.validityType- The type of certificates to get.- Returns:
- An array of certificates.
- Throws:
EBaseException- on error.
-
getX509Certificates
public org.mozilla.jss.netscape.security.x509.X509CertImpl[] getX509Certificates(java.lang.String filter) throws EBaseException- Throws:
EBaseException
-
getValidCertificates
public java.util.Enumeration<CertRecord> getValidCertificates(java.lang.String from, java.lang.String to) throws EBaseException
Retrieves valid certificates.- Parameters:
from- starting serial numberto- ending serial number- Returns:
- a list of certificates
- Throws:
EBaseException- failed to retrieve
-
getAllValidCertificates
public java.util.Enumeration<CertRecord> getAllValidCertificates() throws EBaseException
Retrives all valid certificates excluding ones already revoked.- Throws:
EBaseException
-
getValidNotPublishedCertificates
public java.util.Enumeration<CertRecord> getValidNotPublishedCertificates(java.lang.String from, java.lang.String to) throws EBaseException
Retrieves valid and not published certificates.- Parameters:
from- starting serial numberto- ending serial number- Returns:
- a list of certificates
- Throws:
EBaseException- failed to retrieve
-
getAllValidNotPublishedCertificates
public java.util.Enumeration<CertRecord> getAllValidNotPublishedCertificates() throws EBaseException
Retrives all valid not published certificates excluding ones already revoked.- Throws:
EBaseException
-
getExpiredCertificates
public java.util.Enumeration<CertRecord> getExpiredCertificates(java.lang.String from, java.lang.String to) throws EBaseException
Retrieves expired certificates.- Parameters:
from- starting serial numberto- ending serial number- Returns:
- a list of certificates
- Throws:
EBaseException- failed to retrieve
-
getAllExpiredCertificates
public java.util.Enumeration<CertRecord> getAllExpiredCertificates() throws EBaseException
Retrives all expired certificates.- Throws:
EBaseException
-
getExpiredPublishedCertificates
public java.util.Enumeration<CertRecord> getExpiredPublishedCertificates(java.lang.String from, java.lang.String to) throws EBaseException
Retrieves expired and published certificates.- Parameters:
from- starting serial numberto- ending serial number- Returns:
- a list of certificates
- Throws:
EBaseException- failed to retrieve
-
getAllExpiredPublishedCertificates
public java.util.Enumeration<CertRecord> getAllExpiredPublishedCertificates() throws EBaseException
Retrives all expired publishedcertificates.- Throws:
EBaseException
-
getInvalidCertsByNotBeforeDate
public CertRecordList getInvalidCertsByNotBeforeDate(java.util.Date date, int pageSize) throws EBaseException
Gets Invalid certs orderes by noAfter date, jumps to records where notAfter date is greater than current.- Parameters:
date- reference datepageSize- page size- Returns:
- a list of certificate records
- Throws:
EBaseException- failed to retrieve
-
getValidCertsByNotAfterDate
public CertRecordList getValidCertsByNotAfterDate(java.util.Date date, int pageSize) throws EBaseException
Gets valid certs orderes by noAfter date, jumps to records where notAfter date is greater than current.- Parameters:
date- reference datepageSize- page size- Returns:
- a list of certificate records
- Throws:
EBaseException- failed to retrieve
-
getRevokedCertsByNotAfterDate
public CertRecordList getRevokedCertsByNotAfterDate(java.util.Date date, int pageSize) throws EBaseException
Gets Revoked certs orderes by noAfter date, jumps to records where notAfter date is greater than current.- Parameters:
date- reference datepageSize- page size- Returns:
- a list of certificate records
- Throws:
EBaseException- failed to retrieve
-
getRevokedCertificates
public java.util.Enumeration<CertRecord> getRevokedCertificates(java.lang.String from, java.lang.String to) throws EBaseException
Retrieves revoked certificates.- Parameters:
from- starting serial numberto- ending serial number- Returns:
- a list of certificates
- Throws:
EBaseException- failed to retrieve
-
getAllRevokedCertificates
public java.util.Enumeration<CertRecord> getAllRevokedCertificates() throws EBaseException
Retrieves all revoked certificates including ones that have expired or that are not yet valid.- Returns:
- a list of revoked certificates
- Throws:
EBaseException- failed to search
-
getRevokedPublishedCertificates
public java.util.Enumeration<CertRecord> getRevokedPublishedCertificates(java.lang.String from, java.lang.String to) throws EBaseException
Retrieves revoked and published certificates.- Parameters:
from- starting serial numberto- ending serial number- Returns:
- a list of certificates
- Throws:
EBaseException- failed to retrieve
-
getAllRevokedPublishedCertificates
public java.util.Enumeration<CertRecord> getAllRevokedPublishedCertificates() throws EBaseException
Retrives all revoked published certificates including ones already expired or not yet valid.- Throws:
EBaseException
-
getRevokedCertificates
public java.util.Enumeration<CertRecord> getRevokedCertificates(java.util.Date asOfDate) throws EBaseException
Retrieves all revoked certificates that have not expired.- Parameters:
asOfDate- as of date- Returns:
- a list of revoked certificates
- Throws:
EBaseException- failed to retrieve
-
getAllRevokedNonExpiredCertificates
public java.util.Enumeration<CertRecord> getAllRevokedNonExpiredCertificates() throws EBaseException
Retrieves all revoked but not expired certificates.- Returns:
- a list of revoked certificates
- Throws:
EBaseException- failed to search
-
isCertificateRevoked
public RevocationInfo isCertificateRevoked(org.mozilla.jss.netscape.security.x509.X509CertImpl cert) throws EBaseException
Checks if the presented certificate belongs to the repository and is revoked.- Parameters:
cert- certificate to verify.- Returns:
- RevocationInfo if the presented certificate is revoked otherwise null.
- Throws:
EBaseException
-
shutdown
public void shutdown()
-
-