Package org.xipki.ca.server
Interface CertStore
-
- All Known Implementing Classes:
DbCertStore
public interface CertStoreCA cert store.- Since:
- 2.0.0
- Author:
- Lijun Liao (xipki)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCertStore.CertStatusstatic classCertStore.SerialWithId
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCa(org.xipki.ca.api.NameId ident, org.xipki.security.X509Cert caCert, org.xipki.security.CertRevocationInfo caRevInfo)booleanaddCert(org.xipki.ca.api.CertificateInfo certInfo, boolean saveKeypair)voidaddCertProfile(org.xipki.ca.api.NameId ident)voidaddCrl(org.xipki.ca.api.NameId ca, org.bouncycastle.cert.X509CRLHolder crl)voidaddRequestor(org.xipki.ca.api.NameId ident)intcleanupCrls(org.xipki.ca.api.NameId ca, int numCrls)org.xipki.security.X509CertgetCert(org.bouncycastle.asn1.x500.X500Name subjectName, String transactionId)Get certificate for given subject and transactionId.org.xipki.ca.api.CertificateInfogetCertForId(org.xipki.ca.api.NameId ca, org.xipki.security.X509Cert caCert, long certId, CaIdNameMap idNameMap)longgetCertId(org.xipki.ca.api.NameId ca, BigInteger serial)org.xipki.ca.api.CertificateInfogetCertInfo(org.xipki.ca.api.NameId ca, org.xipki.security.X509Cert caCert, BigInteger serial, CaIdNameMap idNameMap)List<CertRevInfoWithSerial>getCertsForDeltaCrl(org.xipki.ca.api.NameId ca, BigInteger baseCrlNumber, Instant notExpiredAt)CertStore.CertStatusgetCertStatusForSubject(org.xipki.ca.api.NameId ca, org.bouncycastle.asn1.x500.X500Name subject)org.xipki.ca.api.mgmt.CertWithRevocationInfogetCertWithRevocationInfo(int caId, BigInteger serial, CaIdNameMap idNameMap)org.xipki.ca.api.mgmt.CertWithRevocationInfogetCertWithRevocationInfo(long certId, CaIdNameMap idNameMap)org.xipki.ca.api.mgmt.CertWithRevocationInfogetCertWithRevocationInfoBySubject(int caId, org.bouncycastle.asn1.x500.X500Name subject, byte[] san, CaIdNameMap idNameMap)longgetCountOfCerts(long notBeforeSince)longgetCountOfCerts(org.xipki.ca.api.NameId ca, boolean onlyRevoked)byte[]getEncodedCrl(org.xipki.ca.api.NameId ca, BigInteger crlNumber)List<CertStore.SerialWithId>getExpiredUnrevokedSerialNumbers(org.xipki.ca.api.NameId ca, long expiredAt, int numEntries)longgetMaxCrlNumber(org.xipki.ca.api.NameId ca)longgetMaxFullCrlNumber(org.xipki.ca.api.NameId ca)List<CertRevInfoWithSerial>getRevokedCerts(org.xipki.ca.api.NameId ca, Instant notExpiredAt, long startId, int numEntries)List<CertStore.SerialWithId>getSerialNumbers(org.xipki.ca.api.NameId ca, long startId, int numEntries, boolean onlyRevoked)List<CertStore.SerialWithId>getSuspendedCertSerials(org.xipki.ca.api.NameId ca, Instant latestLastUpdate, int numEntries)longgetThisUpdateOfCurrentCrl(org.xipki.ca.api.NameId ca, boolean deltaCrl)booleanisHealthy()List<org.xipki.ca.api.mgmt.CertListInfo>listCerts(org.xipki.ca.api.NameId ca, org.bouncycastle.asn1.x500.X500Name subjectPattern, Instant validFrom, Instant validTo, org.xipki.ca.api.mgmt.CertListOrderBy orderBy, int numEntries)voidremoveCa(String name)voidremoveCert(long id)voidremoveCertProfile(String name)voidremoveRequestor(String name)voidrevokeCa(String caName, org.xipki.security.CertRevocationInfo revocationInfo)org.xipki.ca.api.mgmt.CertWithRevocationInforevokeCert(org.xipki.ca.api.NameId ca, BigInteger serialNumber, org.xipki.security.CertRevocationInfo revInfo, boolean force, CaIdNameMap idNameMap)org.xipki.ca.api.mgmt.CertWithRevocationInforevokeSuspendedCert(org.xipki.ca.api.NameId ca, CertStore.SerialWithId serialNumber, org.xipki.security.CrlReason reason, CaIdNameMap idNameMap)voidunrevokeCa(String caName)org.xipki.ca.api.CertWithDbIdunsuspendCert(org.xipki.ca.api.NameId ca, BigInteger serialNumber, boolean force, CaIdNameMap idNamMap)voidupdateDbInfo()
-
-
-
Method Detail
-
removeCa
void removeCa(String name) throws org.xipki.ca.api.mgmt.CaMgmtException
- Throws:
org.xipki.ca.api.mgmt.CaMgmtException
-
removeCertProfile
void removeCertProfile(String name) throws org.xipki.ca.api.mgmt.CaMgmtException
- Throws:
org.xipki.ca.api.mgmt.CaMgmtException
-
removeRequestor
void removeRequestor(String name) throws org.xipki.ca.api.mgmt.CaMgmtException
- Throws:
org.xipki.ca.api.mgmt.CaMgmtException
-
addCertProfile
void addCertProfile(org.xipki.ca.api.NameId ident) throws org.xipki.ca.api.mgmt.CaMgmtException- Throws:
org.xipki.ca.api.mgmt.CaMgmtException
-
addRequestor
void addRequestor(org.xipki.ca.api.NameId ident) throws org.xipki.ca.api.mgmt.CaMgmtException- Throws:
org.xipki.ca.api.mgmt.CaMgmtException
-
addCa
void addCa(org.xipki.ca.api.NameId ident, org.xipki.security.X509Cert caCert, org.xipki.security.CertRevocationInfo caRevInfo) throws org.xipki.ca.api.mgmt.CaMgmtException- Throws:
org.xipki.ca.api.mgmt.CaMgmtException
-
revokeCa
void revokeCa(String caName, org.xipki.security.CertRevocationInfo revocationInfo) throws org.xipki.ca.api.mgmt.CaMgmtException
- Throws:
org.xipki.ca.api.mgmt.CaMgmtException
-
unrevokeCa
void unrevokeCa(String caName) throws org.xipki.ca.api.mgmt.CaMgmtException
- Throws:
org.xipki.ca.api.mgmt.CaMgmtException
-
addCert
boolean addCert(org.xipki.ca.api.CertificateInfo certInfo, boolean saveKeypair)
-
getMaxFullCrlNumber
long getMaxFullCrlNumber(org.xipki.ca.api.NameId ca) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getMaxCrlNumber
long getMaxCrlNumber(org.xipki.ca.api.NameId ca) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getThisUpdateOfCurrentCrl
long getThisUpdateOfCurrentCrl(org.xipki.ca.api.NameId ca, boolean deltaCrl) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
addCrl
void addCrl(org.xipki.ca.api.NameId ca, org.bouncycastle.cert.X509CRLHolder crl) throws org.xipki.pki.OperationException, CRLException- Throws:
org.xipki.pki.OperationExceptionCRLException
-
revokeCert
org.xipki.ca.api.mgmt.CertWithRevocationInfo revokeCert(org.xipki.ca.api.NameId ca, BigInteger serialNumber, org.xipki.security.CertRevocationInfo revInfo, boolean force, CaIdNameMap idNameMap) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
revokeSuspendedCert
org.xipki.ca.api.mgmt.CertWithRevocationInfo revokeSuspendedCert(org.xipki.ca.api.NameId ca, CertStore.SerialWithId serialNumber, org.xipki.security.CrlReason reason, CaIdNameMap idNameMap) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
unsuspendCert
org.xipki.ca.api.CertWithDbId unsuspendCert(org.xipki.ca.api.NameId ca, BigInteger serialNumber, boolean force, CaIdNameMap idNamMap) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
removeCert
void removeCert(long id) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getCountOfCerts
long getCountOfCerts(org.xipki.ca.api.NameId ca, boolean onlyRevoked) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getCountOfCerts
long getCountOfCerts(long notBeforeSince) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getSerialNumbers
List<CertStore.SerialWithId> getSerialNumbers(org.xipki.ca.api.NameId ca, long startId, int numEntries, boolean onlyRevoked) throws org.xipki.pki.OperationException
- Throws:
org.xipki.pki.OperationException
-
getExpiredUnrevokedSerialNumbers
List<CertStore.SerialWithId> getExpiredUnrevokedSerialNumbers(org.xipki.ca.api.NameId ca, long expiredAt, int numEntries) throws org.xipki.pki.OperationException
- Throws:
org.xipki.pki.OperationException
-
getSuspendedCertSerials
List<CertStore.SerialWithId> getSuspendedCertSerials(org.xipki.ca.api.NameId ca, Instant latestLastUpdate, int numEntries) throws org.xipki.pki.OperationException
- Throws:
org.xipki.pki.OperationException
-
getEncodedCrl
byte[] getEncodedCrl(org.xipki.ca.api.NameId ca, BigInteger crlNumber) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
cleanupCrls
int cleanupCrls(org.xipki.ca.api.NameId ca, int numCrls) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getCertForId
org.xipki.ca.api.CertificateInfo getCertForId(org.xipki.ca.api.NameId ca, org.xipki.security.X509Cert caCert, long certId, CaIdNameMap idNameMap) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getCertWithRevocationInfo
org.xipki.ca.api.mgmt.CertWithRevocationInfo getCertWithRevocationInfo(long certId, CaIdNameMap idNameMap) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getCertWithRevocationInfo
org.xipki.ca.api.mgmt.CertWithRevocationInfo getCertWithRevocationInfo(int caId, BigInteger serial, CaIdNameMap idNameMap) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getCertWithRevocationInfoBySubject
org.xipki.ca.api.mgmt.CertWithRevocationInfo getCertWithRevocationInfoBySubject(int caId, org.bouncycastle.asn1.x500.X500Name subject, byte[] san, CaIdNameMap idNameMap) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getCertId
long getCertId(org.xipki.ca.api.NameId ca, BigInteger serial) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getCertInfo
org.xipki.ca.api.CertificateInfo getCertInfo(org.xipki.ca.api.NameId ca, org.xipki.security.X509Cert caCert, BigInteger serial, CaIdNameMap idNameMap) throws org.xipki.pki.OperationException- Throws:
org.xipki.pki.OperationException
-
getCert
org.xipki.security.X509Cert getCert(org.bouncycastle.asn1.x500.X500Name subjectName, String transactionId) throws org.xipki.pki.OperationExceptionGet certificate for given subject and transactionId.- Parameters:
subjectName- Subject of Certificate or requested Subject.transactionId- the transactionId- Returns:
- certificate for given subject and transactionId.
- Throws:
org.xipki.pki.OperationException- If error occurs.
-
listCerts
List<org.xipki.ca.api.mgmt.CertListInfo> listCerts(org.xipki.ca.api.NameId ca, org.bouncycastle.asn1.x500.X500Name subjectPattern, Instant validFrom, Instant validTo, org.xipki.ca.api.mgmt.CertListOrderBy orderBy, int numEntries) throws org.xipki.pki.OperationException
- Throws:
org.xipki.pki.OperationException
-
getRevokedCerts
List<CertRevInfoWithSerial> getRevokedCerts(org.xipki.ca.api.NameId ca, Instant notExpiredAt, long startId, int numEntries) throws org.xipki.pki.OperationException
- Throws:
org.xipki.pki.OperationException
-
getCertsForDeltaCrl
List<CertRevInfoWithSerial> getCertsForDeltaCrl(org.xipki.ca.api.NameId ca, BigInteger baseCrlNumber, Instant notExpiredAt) throws org.xipki.pki.OperationException
- Throws:
org.xipki.pki.OperationException
-
getCertStatusForSubject
CertStore.CertStatus getCertStatusForSubject(org.xipki.ca.api.NameId ca, org.bouncycastle.asn1.x500.X500Name subject) throws org.xipki.pki.OperationException
- Throws:
org.xipki.pki.OperationException
-
isHealthy
boolean isHealthy()
-
updateDbInfo
void updateDbInfo() throws org.xipki.datasource.DataAccessException, org.xipki.ca.api.mgmt.CaMgmtException- Throws:
org.xipki.datasource.DataAccessExceptionorg.xipki.ca.api.mgmt.CaMgmtException
-
-