public interface ICertificateRepository extends IRepository
Modifier and Type | Field and Description |
---|---|
static int |
ALL_CERTS |
static int |
ALL_UNREVOKED_CERTS |
static int |
ALL_VALID_CERTS |
Modifier and Type | Method and Description |
---|---|
void |
addCertificateRecord(ICertRecord record)
Adds a certificate record to the repository.
|
boolean |
containsCertificate(java.math.BigInteger serialNo)
Checks if the certificate exists in this repository.
|
ICertRecord |
createCertRecord(java.math.BigInteger id,
java.security.cert.Certificate cert,
MetaInfo meta)
Creates certificate record.
|
void |
deleteCertificateRecord(java.math.BigInteger serialNo)
Deletes certificate from this repository.
|
java.util.Enumeration<netscape.security.x509.X509CertImpl> |
findCertificates(java.lang.String filter)
Finds all certificates given a filter.
|
java.util.Enumeration<ICertRecord> |
findCertRecords(java.lang.String filter)
Finds all certificate records given a filter.
|
ICertRecordList |
findCertRecordsInList(java.lang.String filter,
java.lang.String[] attrs,
int pageSize)
Finds a list of certificate records that satisifies
the filter.
|
ICertRecordList |
findCertRecordsInList(java.lang.String filter,
java.lang.String[] attrs,
java.lang.String jumpTo,
boolean hardJumpTo,
java.lang.String sortKey,
int pageSize) |
ICertRecordList |
findCertRecordsInList(java.lang.String filter,
java.lang.String[] attrs,
java.lang.String sortKey,
int pageSize)
Finds a list of certificate records that satisifies
the filter.
|
ICertRecordList |
findCertRecordsInList(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.
|
ICertRecordList |
findCertRecordsInListRawJumpto(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)
Finds certificate records.
|
java.util.Enumeration<ICertRecord> |
getAllRevokedCertificates()
Retrieves all revoked certificates including ones that have expired
or that are not yet valid.
|
java.util.Enumeration<ICertRecord> |
getAllRevokedNonExpiredCertificates()
Retrieves all revoked but not expired certificates.
|
boolean |
getEnableRandomSerialNumbers()
Retrieves serial number management mode.
|
java.util.Enumeration<ICertRecord> |
getExpiredCertificates(java.lang.String from,
java.lang.String to)
Retrieves expired certificates.
|
java.util.Enumeration<ICertRecord> |
getExpiredPublishedCertificates(java.lang.String from,
java.lang.String to)
Retrieves expired and published certificates.
|
ICertRecordList |
getInvalidCertsByNotBeforeDate(java.util.Date date,
int pageSize)
Gets Invalid certs orderes by noAfter date, jumps to records
where notAfter date is greater than current.
|
void |
getModifications(netscape.ldap.LDAPEntry entry)
Retrieves modified certificate records.
|
java.math.BigInteger |
getNextSerialNumber()
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<ICertRecord> |
getRevokedCertificates(java.util.Date asOfDate)
Retrieves all the revoked certificates that have not expired.
|
java.util.Enumeration<ICertRecord> |
getRevokedCertificates(java.lang.String from,
java.lang.String to)
Retrieves revoked certificates.
|
ICertRecordList |
getRevokedCertsByNotAfterDate(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<ICertRecord> |
getRevokedPublishedCertificates(java.lang.String from,
java.lang.String to)
Retrieves revoked and published certificates.
|
java.util.Enumeration<ICertRecord> |
getValidCertificates(java.lang.String from,
java.lang.String to)
Retrieves valid certificates.
|
ICertRecordList |
getValidCertsByNotAfterDate(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<ICertRecord> |
getValidNotPublishedCertificates(java.lang.String from,
java.lang.String to)
Retrieves valid and not published certificates.
|
netscape.security.x509.X509CertImpl |
getX509Certificate(java.math.BigInteger serialNo)
Reads the certificate identified by the given serial no.
|
netscape.security.x509.X509CertImpl[] |
getX509Certificates(java.lang.String subjectDN,
int validityType)
Gets all valid and unexpired certificates pertaining
to a subject DN.
|
void |
markAsRevoked(java.math.BigInteger id,
IRevocationInfo info)
Marks certificate as revoked.
|
void |
markAsRevoked(java.math.BigInteger id,
IRevocationInfo info,
boolean isAlreadyOnHold) |
void |
markCertificateAsNotRenewable(ICertRecord record)
Marks certificate as not renewable.
|
void |
markCertificateAsRenewable(ICertRecord record)
Marks certificate as renewable.
|
void |
markCertificateAsRenewalNotified(java.lang.String serialNo)
Marks certificate as renewed and notified.
|
void |
markCertificateAsRenewed(java.lang.String serialNo)
Marks certificate as renewed.
|
void |
modifyCertificateRecord(java.math.BigInteger serialNo,
ModificationSet mods)
Modifies certificate record.
|
ICertRecord |
readCertificateRecord(java.math.BigInteger serialNo)
Reads certificate from repository.
|
void |
removeCertRecords(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<ICertRecord> |
searchCertificates(java.lang.String filter,
int maxSize,
int timeLimit)
Finds a list of certificate records that satisifies
the filter.
|
java.util.Enumeration<ICertRecord> |
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.
|
void |
setCertStatusUpdateInterval(IRepository requestRepo,
int interval,
boolean listenToCloneModifications)
Sets certificate status update internal
|
void |
setEnableRandomSerialNumbers(boolean random,
boolean updateMode,
boolean forceModeChange)
Sets serial number management mode for certificates..
|
void |
shutdown() |
void |
unmarkRevoked(java.math.BigInteger id,
IRevocationInfo info,
java.util.Date revokedOn,
java.lang.String revokedBy)
Unmark a revoked certificates.
|
void |
updateCertStatus()
Updates certificate status now.
|
void |
updateStatus(java.math.BigInteger id,
java.lang.String status)
Updates certificate status.
|
checkRanges, getTheSerialNumber, resetSerialNumber, setEnableSerialMgmt, setMaxSerial, setNextMaxSerial
static final int ALL_CERTS
static final int ALL_VALID_CERTS
static final int ALL_UNREVOKED_CERTS
java.math.BigInteger getNextSerialNumber() throws EBaseException
getNextSerialNumber
in interface IRepository
EBaseException
- failed to retrieve next serial numbervoid addCertificateRecord(ICertRecord record) throws EBaseException
record
- X.509 certificateEBaseException
- failed to add new certificate to
the repositorynetscape.security.x509.X509CertImpl getX509Certificate(java.math.BigInteger serialNo) throws EBaseException
serialNo
- serial number of certificateEBaseException
- failed to retrieve certificateICertRecord readCertificateRecord(java.math.BigInteger serialNo) throws EBaseException
serialNo
- serial number of certificateEBaseException
- failed to retrieve certificatevoid setCertStatusUpdateInterval(IRepository requestRepo, int interval, boolean listenToCloneModifications)
requestRepo
- request repositoryinterval
- update intervallistenToCloneModifications
- enable listening to clone modificationsvoid updateCertStatus() throws EBaseException
EBaseException
- failed to updatevoid modifyCertificateRecord(java.math.BigInteger serialNo, ModificationSet mods) throws EBaseException
serialNo
- serial number of recordmods
- modificationsEBaseException
- failed to modifyboolean containsCertificate(java.math.BigInteger serialNo) throws EBaseException
serialNo
- serial number of certificateEBaseException
- failed to checkvoid deleteCertificateRecord(java.math.BigInteger serialNo) throws EBaseException
serialNo
- serial number of certificateEBaseException
- failed to deletevoid markAsRevoked(java.math.BigInteger id, IRevocationInfo info) throws EBaseException
id
- serial numberinfo
- revocation informationisAlreadyOnHold
- boolean to indicate if the cert was revoked onHoldEBaseException
- failed to markvoid markAsRevoked(java.math.BigInteger id, IRevocationInfo info, boolean isAlreadyOnHold) throws EBaseException
EBaseException
void updateStatus(java.math.BigInteger id, java.lang.String status) throws EBaseException
id
- serial numberstatus
- certificate statusEBaseException
- failed to update statusvoid markCertificateAsRenewable(ICertRecord record) throws EBaseException
record
- certificate record to modifyEBaseException
- failed to updatevoid markCertificateAsNotRenewable(ICertRecord record) throws EBaseException
record
- certificate record to modifyEBaseException
- failed to updatevoid markCertificateAsRenewed(java.lang.String serialNo) throws EBaseException
serialNo
- certificate record to modifyEBaseException
- failed to updatevoid markCertificateAsRenewalNotified(java.lang.String serialNo) throws EBaseException
serialNo
- certificate record to modifyEBaseException
- failed to updatejava.util.Enumeration<java.lang.Object> searchCertificates(java.lang.String filter, int maxSize) throws EBaseException
certRecordId certMetaInfo certStatus certCreateTime certModifyTime x509Cert.notBefore x509Cert.notAfter x509Cert.subjectThe filter should follow RFC1558 LDAP filter syntax. For example,
(&(certRecordId=5)(x509Cert.notBefore=934398398))
filter
- search filtermaxSize
- max size to returnEBaseException
- failed to searchjava.util.Enumeration<ICertRecord> searchCertificates(java.lang.String filter, int maxSize, int timeLimit) throws EBaseException
filter
- search filtermaxSize
- max size to returntimeLimit
- timeout valueEBaseException
- failed to searchjava.util.Enumeration<ICertRecord> searchCertificates(java.lang.String filter, int maxSize, int timeLimit, java.lang.String sortAttribute) throws EBaseException
filter
- search filtermaxSize
- max size to returntimeLimit
- timeout valuesortAttribute
- Attribute of ICertRecord to sort the resultsEBaseException
- failed to searchjava.util.Enumeration<java.lang.Object> searchCertificates(java.lang.String filter, int maxSize, java.lang.String sortAttribute) throws EBaseException
filter
- search filtermaxSize
- max size to returnsortAttribute
- Attribute of ICertRecord to sort the resultsEBaseException
- failed to searchICertRecordList findCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, int pageSize) throws EBaseException
filter
- search filterattrs
- selected attributepageSize
- page sizeEBaseException
- failed to searchICertRecordList findCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, java.lang.String sortKey, int pageSize) throws EBaseException
filter
- search filterattrs
- selected attributesortKey
- key to use for sorting the returned elementspageSize
- page sizeEBaseException
- failed to searchICertRecordList findCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, java.lang.String jumpTo, java.lang.String sortKey, int pageSize) throws EBaseException
filter
- search filterattrs
- selected attributejumpTo
- jump to indexsortKey
- key to use for sorting the returned elementspageSize
- page sizeEBaseException
- failed to searchICertRecordList findCertRecordsInList(java.lang.String filter, java.lang.String[] attrs, java.lang.String jumpTo, boolean hardJumpTo, java.lang.String sortKey, int pageSize) throws EBaseException
EBaseException
ICertRecordList findCertRecordsInListRawJumpto(java.lang.String filter, java.lang.String[] attrs, java.lang.String jumpTo, java.lang.String sortKey, int pageSize) throws EBaseException
filter
- search filterattrs
- selected attributejumpTo
- jump to indexsortKey
- key to use for sorting the returned elementspageSize
- page sizeEBaseException
- failed to searchnetscape.security.x509.X509CertImpl[] getX509Certificates(java.lang.String subjectDN, int validityType) throws EBaseException
subjectDN
- The distinguished name of the subject.validityType
- The type of certificatese to retrieve.EBaseException
- on error.java.util.Enumeration<ICertRecord> getRevokedCertificates(java.util.Date asOfDate) throws EBaseException
asOfDate
- as of dateEBaseException
- failed to retrievejava.util.Enumeration<ICertRecord> getAllRevokedCertificates() throws EBaseException
EBaseException
- failed to searchjava.util.Enumeration<ICertRecord> getAllRevokedNonExpiredCertificates() throws EBaseException
EBaseException
- failed to searchjava.util.Enumeration<netscape.security.x509.X509CertImpl> findCertificates(java.lang.String filter) throws EBaseException
filter
- search filterEBaseException
- failed to searchjava.util.Enumeration<ICertRecord> findCertRecords(java.lang.String filter) throws EBaseException
filter
- search filterEBaseException
- failed to searchICertRecordList getRevokedCertsByNotAfterDate(java.util.Date date, int pageSize) throws EBaseException
date
- reference datepageSize
- page sizeEBaseException
- failed to retrieveICertRecordList getInvalidCertsByNotBeforeDate(java.util.Date date, int pageSize) throws EBaseException
date
- reference datepageSize
- page sizeEBaseException
- failed to retrieveICertRecordList getValidCertsByNotAfterDate(java.util.Date date, int pageSize) throws EBaseException
date
- reference datepageSize
- page sizeEBaseException
- failed to retrieveICertRecord createCertRecord(java.math.BigInteger id, java.security.cert.Certificate cert, MetaInfo meta)
id
- serial numbercert
- certificatemeta
- meta informationjava.util.Enumeration<java.lang.Object> findCertRecs(java.lang.String filter) throws EBaseException
filter
- search filterEBaseException
- failed to retrieve cert recordsjava.util.Hashtable<java.lang.String,RenewableCertificateCollection> getRenewableCertificates(java.lang.String renewalTime) throws EBaseException
renewalTime
- renewal timeEBaseException
- failed to retrievevoid unmarkRevoked(java.math.BigInteger id, IRevocationInfo info, java.util.Date revokedOn, java.lang.String revokedBy) throws EBaseException
id
- serial numberinfo
- revocation informationrevokedOn
- revocation daterevokedBy
- useridEBaseException
- failed to unmarkjava.util.Enumeration<ICertRecord> getValidNotPublishedCertificates(java.lang.String from, java.lang.String to) throws EBaseException
from
- starting serial numberto
- ending serial numberEBaseException
- failed to retrievejava.util.Enumeration<ICertRecord> getExpiredPublishedCertificates(java.lang.String from, java.lang.String to) throws EBaseException
from
- starting serial numberto
- ending serial numberEBaseException
- failed to retrievejava.util.Enumeration<ICertRecord> getRevokedPublishedCertificates(java.lang.String from, java.lang.String to) throws EBaseException
from
- starting serial numberto
- ending serial numberEBaseException
- failed to retrievejava.util.Enumeration<ICertRecord> getValidCertificates(java.lang.String from, java.lang.String to) throws EBaseException
from
- starting serial numberto
- ending serial numberEBaseException
- failed to retrievejava.util.Enumeration<ICertRecord> getExpiredCertificates(java.lang.String from, java.lang.String to) throws EBaseException
from
- starting serial numberto
- ending serial numberEBaseException
- failed to retrievejava.util.Enumeration<ICertRecord> getRevokedCertificates(java.lang.String from, java.lang.String to) throws EBaseException
from
- starting serial numberto
- ending serial numberEBaseException
- failed to retrievevoid getModifications(netscape.ldap.LDAPEntry entry)
entry
- LDAPEntry with modified datavoid removeCertRecords(java.math.BigInteger beginS, java.math.BigInteger endS) throws EBaseException
beginS
- BigInteger with radix 16endS
- BigInteger with radix 16EBaseException
boolean getEnableRandomSerialNumbers()
void setEnableRandomSerialNumbers(boolean random, boolean updateMode, boolean forceModeChange)
random
- "true" sets random serial number management, "false" sequentialupdateMode
- "true" updates "description" attribute in certificate repositoryforceModeChange
- "true" forces certificate repository mode changevoid shutdown()