public interface CaManager
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SERIALNUMBER_SIZE
Since serial number should be positive and maximal 20 bytes, the maximal value of bitLen is
159.
|
static int |
MIN_SERIALNUMBER_SIZE
The highest bit is always set to 1, so the effective bit length is bitLen - 1.
|
static String |
NULL |
| Modifier and Type | Method and Description |
|---|---|
void |
addCa(MgmtEntry.Ca caEntry)
Adds a CA.
|
void |
addCaAlias(String aliasName,
String caName)
Adds the alias
aliasName to the given CA caName. |
void |
addCertprofile(MgmtEntry.Certprofile certprofileEntry)
Adds a certificate profile.
|
void |
addCertprofileToCa(String profileName,
String caName)
Add the certificate profile
profileName the the CA caName. |
void |
addPublisher(MgmtEntry.Publisher entry)
Adds a publisher.
|
void |
addPublisherToCa(String publisherName,
String caName)
Adds publisher
publisherName to CA caName. |
void |
addRequestor(MgmtEntry.Requestor requestorEntry)
Adds requstor.
|
void |
addRequestorToCa(MgmtEntry.CaHasRequestor requestor,
String caName)
Adds the requestor
requestorName to the CA caName. |
void |
addSigner(MgmtEntry.Signer signerEntry)
Adds a signer.
|
void |
addUser(MgmtEntry.AddUser addUserEntry)
Adds a user.
|
void |
addUserToCa(MgmtEntry.CaHasUser user,
String caName)
Adds the user
userName from the CA caName. |
void |
changeCa(MgmtEntry.ChangeCa changeCaEntry)
Changes a CA.
|
void |
changeCertprofile(String name,
String type,
String conf)
Changes the certificate profile
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 |
changeUser(MgmtEntry.ChangeUser changeUserEntry)
Change the user.
|
void |
clearPublishQueue(String caName,
List<String> publisherNames)
Clear the publish queue for the CA
caName and publishers publisherNames. |
InputStream |
exportConf(List<String> caNames)
Exports the CA system configuration to a zip-stream.
|
X509Certificate |
generateCertificate(String caName,
String profileName,
byte[] encodedCsr,
Date notBefore,
Date notAfter)
CA
caName issues a new certificate. |
X509CRL |
generateCrlOnDemand(String caName)
Generates a new CRL for CA
caName. |
X509Certificate |
generateRootCa(MgmtEntry.Ca caEntry,
String certprofileName,
byte[] encodedCsr,
BigInteger serialNumber)
Generates a self-signed CA certificate.
|
Set<String> |
getAliasesForCa(String caName)
Gets the aliases of the given CA
caName. |
MgmtEntry.Ca |
getCa(String caName)
Gets the CA named
caName. |
Set<String> |
getCaAliasNames() |
Map<String,MgmtEntry.CaHasUser> |
getCaHasUsersForUser(String user)
Returns map between CA name an CaHasUserEntry for given user.
|
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. |
MgmtEntry.Certprofile |
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. |
byte[] |
getCertRequest(String caName,
BigInteger serialNumber)
Returns the request used to enroll the given certificate.
|
X509CRL |
getCrl(String caName,
BigInteger crlNumber)
Returns the CRL of CA
caName with the CRL number crlNumber. |
X509CRL |
getCurrentCrl(String caName)
Returns the latest CRL of CA
caName. |
Set<String> |
getFailedCaNames() |
Set<String> |
getInactiveCaNames() |
MgmtEntry.Publisher |
getPublisher(String publisherName)
Returns the publisher.
|
Set<String> |
getPublisherNames() |
List<MgmtEntry.Publisher> |
getPublishersForCa(String caName)
Returns publishers for the CA
caName. |
MgmtEntry.Requestor |
getRequestor(String name)
Returns the requestor named
name. |
Set<String> |
getRequestorNames() |
Set<MgmtEntry.CaHasRequestor> |
getRequestorsForCa(String caName)
Returns the Requests supported by the CA
caName. |
MgmtEntry.Signer |
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.
|
MgmtEntry.User |
getUser(String username)
Returns the user
username. |
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,X509Certificate> |
loadConf(InputStream zippedConfStream)
Loads the CA system configuration.
|
void |
notifyCaChange() |
void |
refreshTokenForSignerType(String signerType) |
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 |
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 |
removeUser(String username)
Remove the name
username. |
void |
removeUserFromCa(String userName,
String caName)
Removes the user
userName from the CA caName. |
void |
republishCertificates(String caName,
List<String> publisherNames,
int numThreads)
Republishes certificates of the CA
caName to the publishers publisherNames. |
void |
restartCaSystem() |
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 |
unrevokeCertificate(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 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 refreshTokenForSignerType(String signerType) throws CaMgmtException
CaMgmtExceptionvoid removeCa(String caName) throws CaMgmtException
caName from the system.caName - CA name. Must not be null.CaMgmtException - if error occurs.void restartCaSystem()
throws CaMgmtException
CaMgmtExceptionvoid 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> 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(MgmtEntry.Ca caEntry) throws CaMgmtException
caEntry - CA to be added. Must not be null.CaMgmtException - if error occurs.MgmtEntry.Ca getCa(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.void changeCa(MgmtEntry.ChangeCa 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 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<MgmtEntry.CaHasRequestor> getRequestorsForCa(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.MgmtEntry.Requestor getRequestor(String name) throws CaMgmtException
name.name - Requestor name. Must not be null.CaMgmtException - if error occurs.void addRequestor(MgmtEntry.Requestor 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(MgmtEntry.CaHasRequestor 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.void removeUserFromCa(String userName, String caName) throws CaMgmtException
userName from the CA caName.userName - User name. Must not be null.caName - CA name. Must not be null.CaMgmtException - if error occurs.void addUserToCa(MgmtEntry.CaHasUser user, String caName) throws CaMgmtException
userName from the CA caName.user - User entry. Must not be null.caName - CA name. Must not be null.CaMgmtException - if error occurs.Map<String,MgmtEntry.CaHasUser> getCaHasUsersForUser(String user) throws CaMgmtException
user - UserCaMgmtException - if error occurs.MgmtEntry.Certprofile 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(MgmtEntry.Certprofile certprofileEntry) throws CaMgmtException
certprofileEntry - Certificate profile entry. Must not be null.CaMgmtException - if error occurs.void addSigner(MgmtEntry.Signer 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.MgmtEntry.Signer 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.encodedCert - Encoded certificate of the signer. null indicates no change.CaMgmtException - if error occurs.void addPublisher(MgmtEntry.Publisher entry) throws CaMgmtException
entry - Publisher entry.CaMgmtException - if error occurs.List<MgmtEntry.Publisher> getPublishersForCa(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.MgmtEntry.Publisher 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 unrevokeCertificate(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.X509Certificate 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.X509Certificate generateRootCa(MgmtEntry.Ca caEntry, String certprofileName, byte[] encodedCsr, BigInteger serialNumber) throws CaMgmtException
caEntry - CA entry. Must not be null.certprofileName - Profile name of the root CA certificate. Must not be null.encodedCsr - CSR. Must not be null.serialNumber - Serial number. Could be null.CaMgmtException - if error occurs.void addUser(MgmtEntry.AddUser addUserEntry) throws CaMgmtException
addUserEntry - AddUser entry. Must not be null.CaMgmtException - if error occurs.void changeUser(MgmtEntry.ChangeUser changeUserEntry) throws CaMgmtException
changeUserEntry - User change entry. Must not be null.CaMgmtException - if error occurs.void removeUser(String username) throws CaMgmtException
username.username - User name. Must not be null.CaMgmtException - if error occurs.MgmtEntry.User getUser(String username) throws CaMgmtException
username.username - User name. Must not be null.CaMgmtException - if error occurs.X509CRL generateCrlOnDemand(String caName) throws CaMgmtException
caName.caName - CA name. Must not be null.CaMgmtException - if error occurs.X509CRL 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.X509CRL 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,X509Certificate> loadConf(InputStream zippedConfStream) throws CaMgmtException, IOException
zippedConfStream - Inputstream of the zipped Configuration the CA system. Must not be null.CaMgmtException - if error occurs.IOExceptionInputStream 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.byte[] getCertRequest(String caName, BigInteger serialNumber) throws CaMgmtException
caName - CA name. Must not be null.serialNumber - Serial number. Must not be null.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.Copyright © 2019. All rights reserved.