public class CertStore extends CertStoreBase
| Modifier and Type | Class and Description |
|---|---|
static class |
CertStore.CertStatus |
static class |
CertStore.KnowCertResult |
static class |
CertStore.SerialWithId |
static class |
CertStore.SystemEvent |
protected static class |
QueryExecutor.ColumnType |
protected static class |
QueryExecutor.DbSchemaInfo |
protected static class |
QueryExecutor.SqlColumn |
protected static class |
QueryExecutor.SqlColumn2 |
| Modifier and Type | Field and Description |
|---|---|
protected org.xipki.datasource.DataSourceWrapper |
datasource |
dbSchemaVersion, maxX500nameLen, SQL_ADD_CERT, SQL_ADD_CERT_V4, SQL_ADD_CRL, SQL_ADD_REQCERT, SQL_ADD_REQUEST, SQL_DELETE_UNREFERENCED_REQUEST, SQL_INSERT_PUBLISHQUEUE, SQL_MAX_CRLNO, SQL_MAX_FULL_CRLNO, SQL_MAX_THISUPDAATE_CRL, SQL_REMOVE_CERT_FOR_ID, SQL_REMOVE_PUBLISHQUEUE, SQL_REVOKE_CERT, SQL_REVOKE_SUSPENDED_CERT| Constructor and Description |
|---|
CertStore(org.xipki.datasource.DataSourceWrapper datasource,
UniqueIdGenerator idGenerator) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCert(org.xipki.ca.api.CertificateInfo certInfo) |
void |
addCrl(org.xipki.ca.api.NameId ca,
org.bouncycastle.cert.X509CRLHolder crl) |
long |
addRequest(byte[] request) |
void |
addRequestCert(long requestId,
long certId) |
void |
addToPublishQueue(org.xipki.ca.api.NameId publisher,
long certId,
org.xipki.ca.api.NameId ca) |
org.xipki.ca.api.NameId |
authenticateUser(String user,
byte[] password) |
protected PreparedStatement |
buildPrepStmt(String sql,
QueryExecutor.SqlColumn2... columns) |
protected String |
buildSelectFirstSql(String coreSql) |
protected String |
buildSelectFirstSql(String orderBy,
String coreSql) |
int |
cleanupCrls(org.xipki.ca.api.NameId ca,
int numCrls) |
void |
clearPublishQueue(org.xipki.ca.api.NameId ca,
org.xipki.ca.api.NameId publisher) |
protected static QueryExecutor.SqlColumn2 |
col2Bool(Boolean value) |
protected static QueryExecutor.SqlColumn2 |
col2Int(Integer value) |
protected static QueryExecutor.SqlColumn2 |
col2Long(Long value) |
protected static QueryExecutor.SqlColumn2 |
col2Str(String value) |
protected static QueryExecutor.SqlColumn2 |
col2Timestamp(Timestamp value) |
protected static QueryExecutor.SqlColumn |
colBool(String name,
Boolean value) |
protected static QueryExecutor.SqlColumn |
colInt(String name,
Integer value) |
protected static QueryExecutor.SqlColumn |
colLong(String name,
Long value) |
protected static QueryExecutor.SqlColumn |
colStr(String name,
String value) |
protected static QueryExecutor.SqlColumn |
colStr(String name,
String value,
boolean sensitive,
boolean signerConf) |
void |
deleteUnreferencedRequests() |
protected org.xipki.ca.server.db.ResultRow |
execQuery1PrepStmt(String sql,
QueryExecutor.SqlColumn2... params) |
protected List<org.xipki.ca.server.db.ResultRow> |
execQueryPrepStmt(String sql,
QueryExecutor.SqlColumn2... params) |
protected List<org.xipki.ca.server.db.ResultRow> |
execQueryStmt(String sql) |
protected int |
execUpdatePrepStmt(String sql,
QueryExecutor.SqlColumn2... params) |
protected int |
execUpdateStmt(String sql) |
org.xipki.ca.api.mgmt.entry.CaHasUserEntry |
getCaHasUser(org.xipki.ca.api.NameId ca,
org.xipki.ca.api.NameId user) |
List<org.xipki.security.X509Cert> |
getCert(org.bouncycastle.asn1.x500.X500Name subjectName,
byte[] transactionId)
Get certificates for given subject and transactionId.
|
org.xipki.ca.api.CertificateInfo |
getCertForId(org.xipki.ca.api.NameId ca,
org.xipki.security.X509Cert caCert,
long certId,
CaIdNameMap idNameMap) |
long |
getCertId(org.xipki.ca.api.NameId ca,
BigInteger serial) |
org.xipki.ca.api.CertificateInfo |
getCertInfo(org.xipki.ca.api.NameId ca,
org.xipki.security.X509Cert caCert,
BigInteger serial,
CaIdNameMap idNameMap) |
byte[] |
getCertRequest(org.xipki.ca.api.NameId ca,
BigInteger serialNumber) |
List<CertRevInfoWithSerial> |
getCertsForDeltaCrl(org.xipki.ca.api.NameId ca,
BigInteger baseCrlNumber,
Date notExpiredAt) |
CertStore.CertStatus |
getCertStatusForSubject(org.xipki.ca.api.NameId ca,
org.bouncycastle.asn1.x500.X500Name subject) |
org.xipki.ca.api.mgmt.CertWithRevocationInfo |
getCertWithRevocationInfo(int caId,
BigInteger serial,
CaIdNameMap idNameMap) |
org.xipki.ca.api.mgmt.CertWithRevocationInfo |
getCertWithRevocationInfo(long certId,
CaIdNameMap idNameMap) |
long |
getCountOfCerts(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) |
long |
getMaxCrlNumber(org.xipki.ca.api.NameId ca) |
long |
getMaxFullCrlNumber(org.xipki.ca.api.NameId ca) |
List<Long> |
getPublishQueueEntries(org.xipki.ca.api.NameId ca,
org.xipki.ca.api.NameId publisher,
int numEntries) |
List<CertRevInfoWithSerial> |
getRevokedCerts(org.xipki.ca.api.NameId ca,
Date 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,
long latestLastUpdate,
int numEntries) |
long |
getThisUpdateOfCurrentCrl(org.xipki.ca.api.NameId ca,
boolean deltaCrl) |
String |
getUsername(int id) |
boolean |
isHealthy() |
CertStore.KnowCertResult |
knowsCertForSerial(org.xipki.ca.api.NameId ca,
BigInteger serial) |
List<org.xipki.ca.api.mgmt.CertListInfo> |
listCerts(org.xipki.ca.api.NameId ca,
org.bouncycastle.asn1.x500.X500Name subjectPattern,
Date validFrom,
Date validTo,
org.xipki.ca.api.mgmt.CertListOrderBy orderBy,
int numEntries) |
protected void |
notNulls(Object param1,
String name1,
Object param2,
String name2) |
protected void |
notNulls(Object param1,
String name1,
Object param2,
String name2,
Object param3,
String name3) |
protected void |
notNulls(Object param1,
String name1,
Object param2,
String name2,
Object param3,
String name3,
Object param4,
String name4) |
void |
removeCert(long id) |
void |
removeCert(org.xipki.ca.api.NameId ca,
BigInteger serialNumber) |
void |
removeFromPublishQueue(org.xipki.ca.api.NameId publisher,
long certId) |
org.xipki.ca.api.mgmt.CertWithRevocationInfo |
revokeCert(org.xipki.ca.api.NameId ca,
BigInteger serialNumber,
org.xipki.security.CertRevocationInfo revInfo,
boolean force,
CaIdNameMap idNameMap) |
org.xipki.ca.api.mgmt.CertWithRevocationInfo |
revokeSuspendedCert(org.xipki.ca.api.NameId ca,
CertStore.SerialWithId serialNumber,
org.xipki.security.CrlReason reason,
CaIdNameMap idNameMap) |
org.xipki.ca.api.CertWithDbId |
unrevokeCert(org.xipki.ca.api.NameId ca,
BigInteger serialNumber,
boolean force,
CaIdNameMap idNamMap) |
buildArraySql, buildCertRevInfo, buildPrepStmt0, execQuery1PrepStmt0, execQueryLongPrepStmt, execQueryPrepStmt0, execQueryStmt0, execUpdatePrepStmt0, execUpdateStmt0, getMax, parseCert, prepareStatementpublic CertStore(org.xipki.datasource.DataSourceWrapper datasource,
UniqueIdGenerator idGenerator)
throws org.xipki.datasource.DataAccessException,
org.xipki.ca.api.mgmt.CaMgmtException
org.xipki.datasource.DataAccessExceptionorg.xipki.ca.api.mgmt.CaMgmtExceptionpublic boolean addCert(org.xipki.ca.api.CertificateInfo certInfo)
public void addToPublishQueue(org.xipki.ca.api.NameId publisher,
long certId,
org.xipki.ca.api.NameId ca)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic void removeFromPublishQueue(org.xipki.ca.api.NameId publisher,
long certId)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic void clearPublishQueue(org.xipki.ca.api.NameId ca,
org.xipki.ca.api.NameId publisher)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic long getMaxFullCrlNumber(org.xipki.ca.api.NameId ca)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic long getMaxCrlNumber(org.xipki.ca.api.NameId ca)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic long getThisUpdateOfCurrentCrl(org.xipki.ca.api.NameId ca,
boolean deltaCrl)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic void addCrl(org.xipki.ca.api.NameId ca,
org.bouncycastle.cert.X509CRLHolder crl)
throws org.xipki.ca.api.OperationException,
CRLException
org.xipki.ca.api.OperationExceptionCRLExceptionpublic 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.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic 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.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic org.xipki.ca.api.CertWithDbId unrevokeCert(org.xipki.ca.api.NameId ca,
BigInteger serialNumber,
boolean force,
CaIdNameMap idNamMap)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic void removeCert(org.xipki.ca.api.NameId ca,
BigInteger serialNumber)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic void removeCert(long id)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic List<Long> getPublishQueueEntries(org.xipki.ca.api.NameId ca, org.xipki.ca.api.NameId publisher, int numEntries) throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic long getCountOfCerts(org.xipki.ca.api.NameId ca,
boolean onlyRevoked)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic List<CertStore.SerialWithId> getSerialNumbers(org.xipki.ca.api.NameId ca, long startId, int numEntries, boolean onlyRevoked) throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic List<CertStore.SerialWithId> getExpiredUnrevokedSerialNumbers(org.xipki.ca.api.NameId ca, long expiredAt, int numEntries) throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic List<CertStore.SerialWithId> getSuspendedCertSerials(org.xipki.ca.api.NameId ca, long latestLastUpdate, int numEntries) throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic byte[] getEncodedCrl(org.xipki.ca.api.NameId ca,
BigInteger crlNumber)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic int cleanupCrls(org.xipki.ca.api.NameId ca,
int numCrls)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic org.xipki.ca.api.CertificateInfo getCertForId(org.xipki.ca.api.NameId ca,
org.xipki.security.X509Cert caCert,
long certId,
CaIdNameMap idNameMap)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic org.xipki.ca.api.mgmt.CertWithRevocationInfo getCertWithRevocationInfo(long certId,
CaIdNameMap idNameMap)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic org.xipki.ca.api.mgmt.CertWithRevocationInfo getCertWithRevocationInfo(int caId,
BigInteger serial,
CaIdNameMap idNameMap)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic long getCertId(org.xipki.ca.api.NameId ca,
BigInteger serial)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic org.xipki.ca.api.CertificateInfo getCertInfo(org.xipki.ca.api.NameId ca,
org.xipki.security.X509Cert caCert,
BigInteger serial,
CaIdNameMap idNameMap)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic List<org.xipki.security.X509Cert> getCert(org.bouncycastle.asn1.x500.X500Name subjectName, byte[] transactionId) throws org.xipki.ca.api.OperationException
subjectName - Subject of Certificate or requested Subject.transactionId - will only be considered if there are more than one certificate
matches the subject.org.xipki.ca.api.OperationException - If error occurs.public byte[] getCertRequest(org.xipki.ca.api.NameId ca,
BigInteger serialNumber)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic List<org.xipki.ca.api.mgmt.CertListInfo> listCerts(org.xipki.ca.api.NameId ca, org.bouncycastle.asn1.x500.X500Name subjectPattern, Date validFrom, Date validTo, org.xipki.ca.api.mgmt.CertListOrderBy orderBy, int numEntries) throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic org.xipki.ca.api.NameId authenticateUser(String user, byte[] password) throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic String getUsername(int id) throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic org.xipki.ca.api.mgmt.entry.CaHasUserEntry getCaHasUser(org.xipki.ca.api.NameId ca,
org.xipki.ca.api.NameId user)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic CertStore.KnowCertResult knowsCertForSerial(org.xipki.ca.api.NameId ca, BigInteger serial) throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic List<CertRevInfoWithSerial> getRevokedCerts(org.xipki.ca.api.NameId ca, Date notExpiredAt, long startId, int numEntries) throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic List<CertRevInfoWithSerial> getCertsForDeltaCrl(org.xipki.ca.api.NameId ca, BigInteger baseCrlNumber, Date notExpiredAt) throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic CertStore.CertStatus getCertStatusForSubject(org.xipki.ca.api.NameId ca, org.bouncycastle.asn1.x500.X500Name subject) throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic boolean isHealthy()
public void deleteUnreferencedRequests()
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic long addRequest(byte[] request)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionpublic void addRequestCert(long requestId,
long certId)
throws org.xipki.ca.api.OperationException
org.xipki.ca.api.OperationExceptionprotected static QueryExecutor.SqlColumn colBool(String name, Boolean value)
protected static QueryExecutor.SqlColumn colInt(String name, Integer value)
protected static QueryExecutor.SqlColumn colLong(String name, Long value)
protected static QueryExecutor.SqlColumn colStr(String name, String value)
protected static QueryExecutor.SqlColumn colStr(String name, String value, boolean sensitive, boolean signerConf)
protected static QueryExecutor.SqlColumn2 col2Bool(Boolean value)
protected static QueryExecutor.SqlColumn2 col2Int(Integer value)
protected static QueryExecutor.SqlColumn2 col2Long(Long value)
protected static QueryExecutor.SqlColumn2 col2Str(String value)
protected static QueryExecutor.SqlColumn2 col2Timestamp(Timestamp value)
protected int execUpdateStmt(String sql) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected int execUpdatePrepStmt(String sql, QueryExecutor.SqlColumn2... params) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected List<org.xipki.ca.server.db.ResultRow> execQueryStmt(String sql) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected org.xipki.ca.server.db.ResultRow execQuery1PrepStmt(String sql, QueryExecutor.SqlColumn2... params) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected List<org.xipki.ca.server.db.ResultRow> execQueryPrepStmt(String sql, QueryExecutor.SqlColumn2... params) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected PreparedStatement buildPrepStmt(String sql, QueryExecutor.SqlColumn2... columns) throws org.xipki.datasource.DataAccessException
org.xipki.datasource.DataAccessExceptionprotected void notNulls(Object param1, String name1, Object param2, String name2, Object param3, String name3)
Copyright © 2021. All rights reserved.