public interface Certificate
String-s. mPRM Certificate Manager specifies three
standard domains:
mPRM_TLS_CLIENT - the certificates in the domain are used by mPRM TLS Client.mPRM_TLS_SERVER - the certificates in the domain are used by mPRM TLS Server.mPRM_RAC - the certificates in the domain are used by mPRM Certificate RAC Login Verifier when verifies the
client certificate.GENERAL_GROUP.
It is up to user to moves certificates form one group to another. A group can be created by adding certificate to a group wit such name.
Note: all set/add methods which fire events, may modified the Certificate Instance AFTER the event is received.
So if one track properties changed (for instance) with event means, should get into CertificateListener.event()
the new properties from the event, instead of geting them from the Certificate instance (which may still be not
updated with the new properties).| Modifier and Type | Field and Description |
|---|---|
static int |
BASE64_ENCODING
Base64 encoded DER format of a certificate.
|
static int |
DER_ENCODING
DER encoding of a certificate.
|
static java.lang.String |
DOMAIN
The export manager on the backend will register Key/Trust Managers per domain with this property into the registration properties.
|
static java.lang.String |
GENERAL_GROUP
The default certificate group.
|
static java.lang.String |
mPRM_RAS
Certificate domain dedicated to be used by RAS verifier which check credentials of a RAC user.
|
static java.lang.String |
mPRM_TLS_CLIENT
Certificate domain dedicated to be used by TLS Client.
|
static java.lang.String |
mPRM_TLS_SERVER
Certificate domain dedicated to be used by TLS Server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToDomain(java.lang.String domain)
Adds the certificate as applicable certificate for the domain, not removing it form domains it already is applicable to.
|
Enumerator |
getAdminRevokedCertificates()
Gets revoked from Admin certificates' serial numbers for the issuer certificate with the specified
key, which are set as revoked by the CRL. |
java.lang.String[] |
getCertificateChain()
Gets the certificate chain of this certificate.
|
Enumerator |
getCRLRevokedCertificates()
Gets revoked from CRL certificates' serial numbers for the issuer certificate with the specified
key, which are set as revoked by the CRL. |
java.lang.String[] |
getDomains()
Returns domains certificate can be applicable to.
|
byte[] |
getEncoded(int encodingFormat)
Returns X.509 certificate binary encoding of the certificate (in DER or BASE64 format).
|
java.lang.String |
getGroup()
Returns the certificate group.
|
java.lang.String |
getIssuer()
Returns issuer of this certificate.
|
java.util.Properties |
getIssuerInfo()
Returns the issuer info into key <-> value format.
|
byte[] |
getKeyPair()
Returns public and private key of the presented certificate.
|
java.util.Dictionary |
getProperties()
Gets properties for the certificate.
|
byte[] |
getPublicKey()
Returns public key associated with this certificate.
|
java.lang.String |
getRevocationListURL()
Gets revocation URL value for the certificate with the given
uniqueName. |
java.lang.String |
getSerialNumber()
Returns hexadecimal representation of the serial number.
|
java.lang.String |
getSignatureAlgorithm()
Returns the string representation of the algorithm used for signing this certificate.
|
java.lang.String |
getSubject()
Returns certificate's subject.
|
java.util.Properties |
getSubjectInfo()
Returns the subject info into key <-> value format.
|
java.lang.String |
getUniqueName()
Returns the unique name (id) of this certificate.
|
java.util.Date |
getValidNotAfter()
Returns the end date of certificate validity as long number.
|
java.util.Date |
getValidNotBefore()
Returns the start date of certificate validity as long number.
|
boolean |
hasKeyPair()
Returns if the certificate has key pair into the Certificate Repository.
|
boolean |
isCRLOk()
Returns if CRL of a certificate into Certificate Repository is Ok, i.e.
|
boolean |
isRevoked(java.lang.String serialNumber)
Checks if certificate with this serial number (issued by this) is revoked.
|
void |
moveToGroup(java.lang.String groupName)
Moves certificate to specified group.
|
void |
removeAdminRevokedCertificate(java.lang.String serialNumber)
Removes explicitly set as revoked from the Administrator certificate, from revoked list.
|
void |
removeFromDomain(java.lang.String domain)
Remove certificate as applicable to this domain.
|
void |
revokeCertificate(java.lang.String serialNumber)
Revokes a certificate with this serial number issued by this certificate.
|
void |
setDomains(java.lang.String[] domains)
Sets that the domains certificate is applicable to.
|
void |
setKeyPair(byte[] keyPair)
Sets key pair for the certifcaite.
|
void |
setProperties(java.util.Dictionary properties)
Sets properties for the certificate.
|
void |
setRevocationListURL(java.lang.String crlURL)
Set revocation URL value for the certificate with the given
uniqueName. |
static final java.lang.String DOMAIN
static final java.lang.String mPRM_TLS_CLIENT
static final java.lang.String mPRM_TLS_SERVER
static final java.lang.String mPRM_RAS
static final java.lang.String GENERAL_GROUP
static final int DER_ENCODING
static final int BASE64_ENCODING
byte[] getEncoded(int encodingFormat)
throws ManagementException
encodingFormat - currently supported formats are DER_ENCODING and BASE64_ENCODINGManagementException - if an exception occurs.java.lang.String getIssuer()
java.lang.String getSerialNumber()
java.lang.String getSubject()
java.util.Date getValidNotBefore()
java.util.Date getValidNotAfter()
java.lang.String getSignatureAlgorithm()
if - an exception occurs.byte[] getPublicKey()
throws ManagementException
ManagementExeption - if a system error occured or the user has no privileges to receive the requested info.ManagementExceptionjava.lang.String[] getCertificateChain()
void setKeyPair(byte[] keyPair)
throws ManagementException
Permission - Certificates - Admin to call this method.keyPair - key pair encoded as byte array.ManagementException - is thrown if an error has occurred while modifying the Certificate Repository or the logged user does not imply the proper role.ManagementExceptionboolean hasKeyPair()
byte[] getKeyPair()
throws ManagementException
Permission - Certificates - Admin to call this method.ManagementException - is thrown if an error has occurred while modifying the Certificate Repository or the logged user does not imply the proper role.java.util.Properties getIssuerInfo()
throws ManagementException
ManagementExceptionjava.util.Properties getSubjectInfo()
throws ManagementException
ManagementExceptionjava.lang.String getUniqueName()
throws ManagementException
ManagementException - if an exception occursjava.lang.String getGroup()
void moveToGroup(java.lang.String groupName)
throws ManagementException
Permission - Certificates - Admin to call this method.groupName - the group name certificate should be moved to.ManagementException - if an exception occurs.void setDomains(java.lang.String[] domains)
throws ManagementException
Permission - Certificates - Admin to call this method.domains - domains the certificate is applicable to.ManagementException - is thrown if an error has occurred while modifying the Certificate Repository or the logged user does not imply the proper role.void addToDomain(java.lang.String domain)
throws ManagementException
Permission - Certificates - Admin to call this method.domain - a domain.ManagementException - if the certificate is already into the domain or an exception occurs.void removeFromDomain(java.lang.String domain)
throws ManagementException
Permission - Certificates - Admin to call this method.domain - a domain.ManagementException - is thrown if an error has occurred while modifying the Certificate Repository or the logged user does not imply the proper role.java.lang.String[] getDomains()
void setRevocationListURL(java.lang.String crlURL)
throws ManagementException
uniqueName.
The logged user must imply the role Permission - Certificates - Admin to call this method.crlURL - URL where the revocation list can be foundManagementException - is thrown if an error has occurred while modifying the Certificate Repository or the logged user does not imply the proper role.java.lang.String getRevocationListURL()
uniqueName.void revokeCertificate(java.lang.String serialNumber)
throws ManagementException
Permission - Certificates - Admin to call this method.serialNumber - the serial number of the issued certificate which will be set as revokedManagementException - is thrown if an error has occurred while changing the database.boolean isCRLOk()
throws java.lang.Exception
java.lang.Exceptionboolean isRevoked(java.lang.String serialNumber)
throws ManagementException
serialNumber - the serial number of the checked certificate in hex format.ManagementException - is thrown if an error has occurred while retrieving data from the database.void removeAdminRevokedCertificate(java.lang.String serialNumber)
throws ManagementException
Permission - Certificates - Admin to call this method.serialNumber - the serial number of the subject certificate which to remove.ManagementException - is thrown if an error has occurred while reading the database.Enumerator getCRLRevokedCertificates() throws ManagementException
key, which are set as revoked by the CRL.
Returns Enumerator containing the serial numbers as String objects. If no such returns null.null will be returnedManagementException - is thrown if an error has occurred while retrieving data from the database.Enumerator getAdminRevokedCertificates() throws ManagementException
key, which are set as revoked by the CRL.
Returns Enumerator containing the serial numbers as String objects. If no such returns null.null will be returnedManagementException - is thrown if an error has occurred while retrieving data from the database.void setProperties(java.util.Dictionary properties)
throws ManagementException
Permission - Certificates - Admin to call this method.properties - properties for the certificate (String <-> String[] or String).ManagementException - is thrown if an error has occurred while modifying the Certificate Repository or the logged user does not imply the proper role.java.util.Dictionary getProperties()
throws ManagementException
Permission - Certificates - Monitor to call this method.ManagementException - is thrown if an error has occurred while modifying the Certificate Repository or the logged user does not imply the proper role.Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.