public interface CaManager
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SERIALNUMBER_SIZE
Since serial number should be positive and maximal 20 bytes.
|
static int |
MIN_SERIALNUMBER_SIZE
Although it is possible to configure it to 1, it is recommended to set it to at least 9.
|
static String |
NULL |
| Modifier and Type | Method and Description |
|---|---|
void |
addCa(CaEntry caEntry)
Adds a CA.
|
void |
addCaAlias(String aliasName,
String caName)
Adds the alias
aliasName to the given CA caName. |
void |
addCertprofile(CertprofileEntry certprofileEntry)
Adds a certificate profile.
|
void |
addCertprofileToCa(String profileName,
String caName)
Add the certificate profile
profileName the CA caName. |
void |
addDbSchema(String name,
String value) |
void |
addKeypairGen(KeypairGenEntry keypairGenEntry)
Adds a keypair generation entry.
|
void |
addPublisher(PublisherEntry entry)
Adds a publisher.
|
void |
addPublisherToCa(String publisherName,
String caName)
Adds publisher
publisherName to CA caName. |
void |
addRequestor(RequestorEntry requestorEntry)
Adds requstor.
|
void |
addRequestorToCa(CaHasRequestorEntry requestor,
String caName)
Adds the requestor
requestorName to the CA caName. |
void |
addSigner(SignerEntry signerEntry)
Adds a signer.
|
void |
changeCa(ChangeCaEntry changeCaEntry)
Changes a CA.
|
void |
changeCertprofile(String name,
String type,
String conf)
Changes the certificate profile
name. |
void |
changeDbSchema(String name,
String value) |
void |
changeKeypairGen(String name,
String type,
String conf)
Changes the keypair generation entry
name. |
void |
changePublisher(String name,
String type,
String conf)
Changes the publisher
name. |
void |
changeRequestor(String name,
String type,
String conf)
Changes the requestor
name of type CERTIFCATE. |
void |
changeSigner(String name,
String type,
String conf,
String base64Cert)
Changes the signer
name. |
void |
clearPublishQueue(String caName,
List<String> publisherNames)
Clear the publishing queue for the CA
caName and publishers publisherNames. |
InputStream |
exportConf(List<String> caNames)
Exports the CA system configuration to a zip-stream.
|
org.xipki.security.X509Cert |
generateCertificate(String caName,
String profileName,
byte[] encodedCsr,
Date notBefore,
Date notAfter)
CA
caName issues a new certificate. |
org.bouncycastle.cert.X509CRLHolder |
generateCrlOnDemand(String caName)
Generates a new CRL for CA
caName. |
org.xipki.security.X509Cert |
generateCrossCertificate(String caName,
String profileName,
byte[] encodedCsr,
byte[] encodedTargetCert,
Date notBefore,
Date notAfter)
CA
caName issues a new certificate. |
org.xipki.security.KeyCertBytesPair |
generateKeyCert(String caName,
String profileName,
String subject,
Date notBefore,
Date notAfter)
CA
caName issues a new certificate. |
org.xipki.security.X509Cert |
generateRootCa(CaEntry caEntry,
String certprofileName,
String subject,
String serialNumber,
Date notBefore,
Date notAfter)
Generates a self-signed CA certificate.
|
Set<String> |
getAliasesForCa(String caName)
Gets the aliases of the given CA
caName. |
CaEntry |
getCa(String caName)
Gets the CA named
caName. |
Set<String> |
getCaAliasNames() |
String |
getCaNameForAlias(String aliasName)
Gets the CA name for the alias
aliasName. |
Set<String> |
getCaNames() |
CaSystemStatus |
getCaSystemStatus() |
CertWithRevocationInfo |
getCert(String caName,
BigInteger serialNumber)
Returns certificate with status information for the CA
caName
and with serial number serialNumber. |
CertWithRevocationInfo |
getCert(org.bouncycastle.asn1.x500.X500Name issuer,
BigInteger serialNumber)
Returns certificate with revocation information for the
issuer
and with serial number serialNumber. |
CertprofileEntry |
getCertprofile(String profileName)
Returns the certificate profile named
profileName. |
Set<String> |
getCertprofileNames() |
Set<String> |
getCertprofilesForCa(String caName)
Returns the Certprofile names supported by the CA
caName. |
org.bouncycastle.cert.X509CRLHolder |
getCrl(String caName,
BigInteger crlNumber)
Returns the CRL of CA
caName with the CRL number crlNumber. |
org.bouncycastle.cert.X509CRLHolder |
getCurrentCrl(String caName)
Returns the latest CRL of CA
caName. |
Map<String,String> |
getDbSchemas() |
Set<String> |
getFailedCaNames() |
Set<String> |
getInactiveCaNames() |
KeypairGenEntry |
getKeypairGen(String name)
Returns the keypair generation entry named
profileName. |
Set<String> |
getKeypairGenNames() |
PublisherEntry |
getPublisher(String publisherName)
Returns the publisher.
|
Set<String> |
getPublisherNames() |
List<PublisherEntry> |
getPublishersForCa(String caName)
Returns publishers for the CA
caName. |
RequestorEntry |
getRequestor(String name)
Returns the requestor named
name. |
Set<String> |
getRequestorNames() |
Set<CaHasRequestorEntry> |
getRequestorsForCa(String caName)
Returns the Requests supported by the CA
caName. |
SignerEntry |
getSigner(String name)
Returns the signer named
name. |
Set<String> |
getSignerNames() |
Set<String> |
getSuccessfulCaNames() |
Set<String> |
getSupportedCertprofileTypes()
Retrieves the types of supported certificate profiles.
|
Set<String> |
getSupportedPublisherTypes()
Retrieves the types of supported publishers.
|
Set<String> |
getSupportedSignerTypes()
Retrieves the types of supported signers.
|
String |
getTokenInfoP11(String moduleName,
Integer slotIndex,
boolean verbose) |
List<CertListInfo> |
listCertificates(String caName,
org.bouncycastle.asn1.x500.X500Name subjectPattern,
Date validFrom,
Date validTo,
CertListOrderBy orderBy,
int numEntries)
Returns a sorted list of certificate meta information.
|
Map<String,org.xipki.security.X509Cert> |
loadConf(InputStream zippedConfStream)
Loads the CA system configuration.
|
void |
notifyCaChange() |
void |
removeCa(String caName)
Removes the CA
caName from the system. |
void |
removeCaAlias(String aliasName)
Remove the alias
aliasName. |
void |
removeCertificate(String caName,
BigInteger serialNumber)
Removes a certificate with the serial number
serialNumber, and
issued by the CA caName. |
void |
removeCertprofile(String profileName)
Removes the certificate profile
profileName. |
void |
removeCertprofileFromCa(String profileName,
String caName)
Removes the support of the certprofile
profileName from the CA caName. |
void |
removeDbSchema(String name) |
void |
removeKeypairGen(String name)
Removes the keypair generation entry
name. |
void |
removePublisher(String publisherName)
Removes the publisher
publisherName. |
void |
removePublisherFromCa(String publisherName,
String caName)
Removes publisher
publisherName from the CA caName. |
void |
removeRequestor(String requestorName)
Removes requestor named
requestorName. |
void |
removeRequestorFromCa(String requestorName,
String caName)
Removes the requestor
requestorName from the CA caName. |
void |
removeSigner(String name)
Removes the signer named
name. |
void |
republishCertificates(String caName,
List<String> publisherNames,
int numThreads)
Republishes certificates of the CA
caName to the publishers publisherNames. |
void |
restartCa(String caName)
Restart the given CA.
|
void |
restartCaSystem()
Restart the whole CA system.
|
void |
revokeCa(String caName,
org.xipki.security.CertRevocationInfo revocationInfo)
Revokes the CA
caName. |
void |
revokeCertificate(String caName,
BigInteger serialNumber,
org.xipki.security.CrlReason reason,
Date invalidityTime)
Revokes a certificate with the serial number
serialNumber, and
issued by the CA caName. |
void |
unlockCa() |
void |
unrevokeCa(String caName)
Unrevokes the CA
caName. |
void |
unsuspendCertificate(String caName,
BigInteger serialNumber)
Unrevokes a certificate with the serial number
serialNumber, and
issued by the CA caName. |
static final String NULL
static final int MIN_SERIALNUMBER_SIZE
static final int MAX_SERIALNUMBER_SIZE
CaSystemStatus getCaSystemStatus() throws CaMgmtException
CaMgmtExceptionvoid unlockCa()
throws CaMgmtException
CaMgmtExceptionvoid notifyCaChange()
throws CaMgmtException
CaMgmtExceptionvoid addDbSchema(String name, String value) throws CaMgmtException
CaMgmtExceptionvoid changeDbSchema(String name, String value) throws CaMgmtException
CaMgmtExceptionvoid removeDbSchema(String name) throws CaMgmtException
CaMgmtExceptionMap<String,String> getDbSchemas() throws CaMgmtException
CaMgmtExceptionvoid republishCertificates(String caName, List<String> publisherNames, int numThreads) throws CaMgmtException
caName to the publishers publisherNames.caName - CA name. Could be null.publisherNames - Publisher names. Could be null.numThreads - Number of threadsCaMgmtException - if error occurs.void clearPublishQueue(String caName, List<String> publisherNames) throws CaMgmtException
caName and publishers publisherNames.caName - CA name. Could be null.publisherNames - Publisher names. Could be null.CaMgmtException - if error occurs.void removeCa(String caName) throws CaMgmtException
caName from the system.caName - CA name. Must not be null.CaMgmtException - if error occurs.void restartCa(String caName) throws CaMgmtException
caName - CA name. Must not be null.CaMgmtException - if error occurs.void restartCaSystem()
throws CaMgmtException
CaMgmtException - if error occurs.void addCaAlias(String aliasName, String caName) throws CaMgmtException
aliasName to the given CA caName.aliasName - CA alias name. Must not be null.caName - CA name. Must not be null.CaMgmtException - if error occurs.void removeCaAlias(String aliasName) throws CaMgmtException
aliasName.aliasName - Alias name. Must not be null.CaMgmtException - if error occurs.Set<String> getAliasesForCa(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.String getCaNameForAlias(String aliasName) throws CaMgmtException
aliasName.aliasName - CA alias name. Must not be null.CaMgmtException - if error occurs.Set<String> getCaAliasNames() throws CaMgmtException
CaMgmtExceptionSet<String> getCertprofileNames() throws CaMgmtException
CaMgmtExceptionSet<String> getKeypairGenNames() throws CaMgmtException
CaMgmtExceptionSet<String> getPublisherNames() throws CaMgmtException
CaMgmtExceptionSet<String> getRequestorNames() throws CaMgmtException
CaMgmtExceptionSet<String> getSignerNames() throws CaMgmtException
CaMgmtExceptionSet<String> getCaNames() throws CaMgmtException
CaMgmtExceptionSet<String> getSuccessfulCaNames() throws CaMgmtException
CaMgmtExceptionSet<String> getFailedCaNames() throws CaMgmtException
CaMgmtExceptionSet<String> getInactiveCaNames() throws CaMgmtException
CaMgmtExceptionvoid addCa(CaEntry caEntry) throws CaMgmtException
caEntry - CA to be added. Must not be null.CaMgmtException - if error occurs.CaEntry getCa(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.void changeCa(ChangeCaEntry changeCaEntry) throws CaMgmtException
changeCaEntry - ChangeCA entry. Must not be null.CaMgmtException - if error occurs.void removeCertprofileFromCa(String profileName, String caName) throws CaMgmtException
profileName from the CA caName.profileName - Profile name. Must not be null.caName - CA name. Must not be null.CaMgmtException - if error occurs.void addCertprofileToCa(String profileName, String caName) throws CaMgmtException
profileName the CA caName.profileName - Profile name. Must not be null.caName - CA name. Must not be null.CaMgmtException - if error occurs.void removePublisherFromCa(String publisherName, String caName) throws CaMgmtException
publisherName from the CA caName.publisherName - Publisher name. Must not be null.caName - CA name. Must not be null.CaMgmtException - if error occurs.void addPublisherToCa(String publisherName, String caName) throws CaMgmtException
publisherName to CA caName.publisherName - Publisher name. Must not be null.caName - CA name. Must not be null.CaMgmtException - if error occurs.Set<String> getCertprofilesForCa(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.Set<CaHasRequestorEntry> getRequestorsForCa(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.RequestorEntry getRequestor(String name) throws CaMgmtException
name.name - Requestor name. Must not be null.CaMgmtException - if error occurs.void addRequestor(RequestorEntry requestorEntry) throws CaMgmtException
requestorEntry - Requestor entry. Must not be null.CaMgmtException - if error occurs.void removeRequestor(String requestorName) throws CaMgmtException
requestorName.requestorName - Requestor name. Must not be null.CaMgmtException - if error occurs.void changeRequestor(String name, String type, String conf) throws CaMgmtException
name of type CERTIFCATE.name - name of the certificate profile to be changed. Must not be null.type - Type to be changed. null indicates no change.conf - Configuration to be changed. null indicates no change.CaMgmtException - if error occurs.void removeRequestorFromCa(String requestorName, String caName) throws CaMgmtException
requestorName from the CA caName.requestorName - Requestor name. Must not be null.caName - CA name. Must not be null.CaMgmtException - if error occurs.void addRequestorToCa(CaHasRequestorEntry requestor, String caName) throws CaMgmtException
requestorName to the CA caName.requestor - Requestor name. Must not be null.caName - CA name. Must not be null.CaMgmtException - if error occurs.CertprofileEntry getCertprofile(String profileName) throws CaMgmtException
profileName.profileName - certificate profile name. Must not be null.CaMgmtException - if error occurs.void removeCertprofile(String profileName) throws CaMgmtException
profileName.profileName - certificate profile name. Must not be null.CaMgmtException - if error occurs.void changeCertprofile(String name, String type, String conf) throws CaMgmtException
name.name - name of the certificate profile to be changed. Must not be null.type - Type to be changed. null indicates no change.conf - Configuration to be changed. null indicates no change.CaMgmtException - if error occurs.void addCertprofile(CertprofileEntry certprofileEntry) throws CaMgmtException
certprofileEntry - Certificate profile entry. Must not be null.CaMgmtException - if error occurs.KeypairGenEntry getKeypairGen(String name) throws CaMgmtException
profileName.name - keypair generation name. Must not be null.CaMgmtException - if error occurs.void removeKeypairGen(String name) throws CaMgmtException
name.name - keypair generation name. Must not be null.CaMgmtException - if error occurs.void changeKeypairGen(String name, String type, String conf) throws CaMgmtException
name.name - name of the keypair generation entry to be changed. Must not be null.type - Type to be changed. null indicates no change.conf - Configuration to be changed. null indicates no change.CaMgmtException - if error occurs.void addKeypairGen(KeypairGenEntry keypairGenEntry) throws CaMgmtException
keypairGenEntry - Keypair generation entry. Must not be null.CaMgmtException - if error occurs.void addSigner(SignerEntry signerEntry) throws CaMgmtException
signerEntry - Signer entry. Must not be null.CaMgmtException - if error occurs.void removeSigner(String name) throws CaMgmtException
name.name - Signer name. Must not be null.CaMgmtException - if error occurs.SignerEntry getSigner(String name) throws CaMgmtException
name.name - Signer name. Must not be null.CaMgmtException - if error occurs.void changeSigner(String name, String type, String conf, String base64Cert) throws CaMgmtException
name.name - name of the signer to be changed. Must not be null.type - Type to be changed. null indicates no change.conf - Configuration to be changed. null indicates no change.base64Cert - Base64 encoded certificate of the signer. null indicates no change.CaMgmtException - if error occurs.void addPublisher(PublisherEntry entry) throws CaMgmtException
entry - Publisher entry.CaMgmtException - if error occurs.List<PublisherEntry> getPublishersForCa(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.PublisherEntry getPublisher(String publisherName) throws CaMgmtException
publisherName - Publisher name. Must not be null.CaMgmtException - if error occurs.void removePublisher(String publisherName) throws CaMgmtException
publisherName.publisherName - Publisher name. Must not be null.CaMgmtException - if error occurs.void changePublisher(String name, String type, String conf) throws CaMgmtException
name.name - name of the publisher to be changed. Must not be null.type - Type to be changed. null indicates no change.conf - Configuration to be changed. null indicates no change.CaMgmtException - if error occurs.void revokeCa(String caName, org.xipki.security.CertRevocationInfo revocationInfo) throws CaMgmtException
caName.caName - CA name. Must not be null.revocationInfo - Revocation information. Must not be null.CaMgmtException - if error occurs.void unrevokeCa(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.void revokeCertificate(String caName, BigInteger serialNumber, org.xipki.security.CrlReason reason, Date invalidityTime) throws CaMgmtException
serialNumber, and
issued by the CA caName.caName - CA name. Must not be null.serialNumber - Serial number. Must not be null.reason - Revocation reason. Must not be null.invalidityTime - Invalidity time. Could be null.CaMgmtException - if error occurs.void unsuspendCertificate(String caName, BigInteger serialNumber) throws CaMgmtException
serialNumber, and
issued by the CA caName.caName - CA name. Must not be null.serialNumber - Serial number. Must not be null.CaMgmtException - if error occurs.void removeCertificate(String caName, BigInteger serialNumber) throws CaMgmtException
serialNumber, and
issued by the CA caName.caName - CA name. Must not be null.serialNumber - Serial number. Must not be null.CaMgmtException - if error occurs.org.xipki.security.X509Cert generateCertificate(String caName, String profileName, byte[] encodedCsr, Date notBefore, Date notAfter) throws CaMgmtException
caName issues a new certificate.caName - CA name. Must not be null.profileName - Name of the certificate profile. Must not be null.encodedCsr - CSR. Must not be null.notBefore - NotBefore. Could be null.notAfter - NotAfter. Could be null.CaMgmtException - if error occurs.org.xipki.security.KeyCertBytesPair generateKeyCert(String caName, String profileName, String subject, Date notBefore, Date notAfter) throws CaMgmtException
caName issues a new certificate.caName - CA name. Must not be null.profileName - Name of the certificate profile. Must not be null.subject - Subject. Must not be null.notBefore - NotBefore. Could be null.notAfter - NotAfter. Could be null.CaMgmtException - if error occurs.org.xipki.security.X509Cert generateCrossCertificate(String caName, String profileName, byte[] encodedCsr, byte[] encodedTargetCert, Date notBefore, Date notAfter) throws CaMgmtException
caName issues a new certificate.caName - CA name. Must not be null.profileName - Name of the certificate profile. Must not be null.encodedCsr - CSR. Must not be null.encodedTargetCert - certificate file, for which the cross certificate will be
generated. There shall be not different in subject and public
key between #encodedCsr and #encodedCert.notBefore - NotBefore.notAfter - NotAfterCaMgmtException - if error occurs.org.xipki.security.X509Cert generateRootCa(CaEntry caEntry, String certprofileName, String subject, String serialNumber, Date notBefore, Date notAfter) throws CaMgmtException
caEntry - CA entry. Must not be null.certprofileName - Profile name of the root CA certificate. Must not be null.subject - Subject. Must not be null.serialNumber - Serial number. null: lets CA choose the serial number;
fixed serialnumber: decimal or heximal (beginning with 0x) number;
RANDOM:<size in bytes> random number with given length.notBefore - NotBefore.notAfter - NotAfterCaMgmtException - if error occurs.org.bouncycastle.cert.X509CRLHolder generateCrlOnDemand(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.org.bouncycastle.cert.X509CRLHolder getCrl(String caName, BigInteger crlNumber) throws CaMgmtException
caName with the CRL number crlNumber.caName - CA name. Must not be null.crlNumber - CRL number. Must not be null.CaMgmtException - if error occurs.org.bouncycastle.cert.X509CRLHolder getCurrentCrl(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.CertWithRevocationInfo getCert(String caName, BigInteger serialNumber) throws CaMgmtException
caName
and with serial number serialNumber.caName - CA name. Must not be null.serialNumber - Serial number. Must not be null.CaMgmtException - if error occurs.CertWithRevocationInfo getCert(org.bouncycastle.asn1.x500.X500Name issuer, BigInteger serialNumber) throws CaMgmtException
issuer
and with serial number serialNumber.issuer - Issuer of the certificate. Must not be null.serialNumber - Serial number. Must not be null.CaMgmtException - if error occurs.Map<String,org.xipki.security.X509Cert> loadConf(InputStream zippedConfStream) throws CaMgmtException, IOException
zippedConfStream - Inputstream of the zipped Configuration the CA system. Must not be null.IOException - If read the ZIP stream fails.CaMgmtException - if other error occurs.InputStream exportConf(List<String> caNames) throws CaMgmtException, IOException
caNames - List of the names of CAs to be exported. null to export all CAs.IOException - If read the ZIP file fails.CaMgmtException - if non-IO error occurs.List<CertListInfo> listCertificates(String caName, org.bouncycastle.asn1.x500.X500Name subjectPattern, Date validFrom, Date validTo, CertListOrderBy orderBy, int numEntries) throws CaMgmtException
caName - CA name. Must not be null.subjectPattern - Subject pattern. Could be null.validFrom - Valid from. Could be null.validTo - Valid to. Could be null.orderBy - How the result is ordered. Could be null.numEntries - Maximal number of entries in the returned list.CaMgmtException - if error occurs.Set<String> getSupportedSignerTypes() throws CaMgmtException
null.CaMgmtException - if error occurs.Set<String> getSupportedCertprofileTypes() throws CaMgmtException
null.CaMgmtException - if error occurs.Set<String> getSupportedPublisherTypes() throws CaMgmtException
null.CaMgmtException - if error occurs.String getTokenInfoP11(String moduleName, Integer slotIndex, boolean verbose) throws CaMgmtException
CaMgmtExceptionCopyright © 2023. All rights reserved.