Oracle® Java ME Embedded Application Management System API Guide Release 3.4 E35109-03 |
|
Previous |
Next |
This chapter introduces the Certificate Info Manager. The CertificateInfoManager
interface, obtained from the AmsFactory
class, is a starting point to begin working with installed certificates. Certificates are used to verify the signature of MIDlet suites that are installed by the AMS. The interface consists of only four methods:
CertificateInfo[] getCertificates()
This method returns an array containing all root certificates available in the system.
CertificateInfo[] getCertificates(String domain)
This method fetches all installed certificates for a specific domain, presented as one of three constants in Table 7-1.
void setStatusListener(CertificateManagerListener theListener)
This method assigns the certificate manager status listener.
The CertificateInfo
interface represents a Java ME certificate. The certificate can exist in one of three domains, as shown inTable 7-1.
Table 7-1 Certificate Domains
Name | Description |
---|---|
|
This constant indicates an identified third party security domain. |
|
This constant indicates a manufacturer security domain. |
|
This constant indicates an operator security domain. |
The CertificateInfo
interface has the following methods:
String getDomain()
This method returns the domain the certificate is bound to as a constant shown in Table 7-1.
long getNotAfter()
This method returns the end of the key's validity period in milliseconds since January 1, 1970.
long getNotBefore()
This method returns the start of the key's validity period in milliseconds since January 1, 1970.
java.lang.String getOwner()
This method returns the distinguished name of the key's owner.
boolean isEnabled()
This method returns a boolean indicating if the certificate is enabled.
void setEnabled(boolean enabled)
The CertificateManagerListener
is an interface for processing certificate updates. It consists of four methods. Each method in the listener interface passes in a CertificateInfo
that describes the certificate in question.
void notifyCertificateInstalled(CertificateInfo cert)
This method notifies a listener the certificate has been installed.
void notifyCertificateRemoved(CertificateInfo cert)
This method notifies a listener the certificate has been removed.
void notifyCertificateEnabled(CertificateInfo cert)
This method notifies a listener the certificate has been enabled.
void notifyCertificateDisabled(CertificateInfo cert)
This method notifies a listener the certificate has been disabled.