| 
 | MIDP3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Certificate
Interface common to certificates. The features abstracted of Certificates
 include subject, issuer, type, version, serial number, signing algorithm,
 dates of valid use, and serial number.
 
Printable Representation for Binary Values
A non-string values in a certificate are represented as strings with each byte as two hex digits (capital letters for A-F) separated by ":" (Unicode U+003A).
For example: 0C:56:FA:80
Printable Representation for X.509 Distinguished Names
An X.509 distinguished name is a sequence of relative names. Each relative name is a sequence of attributes; each attribute is a sequence of an object ID and a value. For string comparison purposes, the following rules define a strict printable representation :
| Object ID | Binary | Label | 
|---|---|---|
| id-at-commonName | 55:04:03 | CN | 
| id-at-surname | 55:04:04 | SN | 
| id-at-countryName | 55:04:06 | C | 
| id-at-localityName | 55:04:07 | L | 
| id-at-stateOrProvinceName | 55:04:08 | ST | 
| id-at-streetAddress | 55:04:09 | STREET | 
| id-at-organizationName | 55:04:0A | O | 
| id-at-organizationUnitName | 55:04:0B | OU | 
| emailAddress | 2A:86:48:86:F7:0D:01:09:01 | EmailAddress | 
Example of a printable distinguished name:
C=US;O=Any Company, Inc.;CN=www.anycompany.com
| Method Summary | |
|---|---|
|  java.lang.String | getIssuer()Gets the name of this certificate's issuer. | 
|  long | getNotAfter()Gets the time after which this Certificatemay not be used
 from the validity period. | 
|  long | getNotBefore()Gets the time before which this Certificatemay not be
 used from the validity period. | 
|  java.lang.String | getSerialNumber()Gets the printable form of the serial number of this Certificate. | 
|  java.lang.String | getSigAlgName()Gets the name of the algorithm used to sign the Certificate. | 
|  java.lang.String | getSubject()Gets the name of this certificate's subject. | 
|  java.lang.String | getType()Get the type of the Certificate. | 
|  java.lang.String | getVersion()Gets the version number of this Certificate. | 
| Method Detail | 
|---|
java.lang.String getSubject()
Certificate; the value MUST
         NOT be null.java.lang.String getIssuer()
Certificate; the value MUST NOT
         be null.java.lang.String getType()
Certificate. For X.509 Certificates
 the value returned is "X.509".
Certificate; the value MUST NOT
         be null.java.lang.String getVersion()
Certificate. The format
 of the version number depends on the specific type and specification. For
 a X.509 certificate per [RFC3280]
 it would be "3".
Certificate; the value
         MUST NOT be null.java.lang.String getSigAlgName()
Certificate.
 The algorithm names returned should be the labels defined in
 [RFC3279] § 2.2.
null.long getNotBefore()
Certificate may not be
 used from the validity period.
Certificate
         is not valid; it MUST be positive, 0 is returned
         if the certificate does not have its validity restricted based on
         the time.long getNotAfter()
Certificate may not be used
 from the validity period.
Certificate
         is not valid (expiration date); it MUST be positive; Long.MAX_VALUE
         is returned if the certificate does not have its validity
         restricted based on the time.java.lang.String getSerialNumber()
Certificate.
 If the serial number within the certificate is binary it
 should be formatted as a string using the binary printable representation
 in class description. For example, 0C:56:FA:80.
null is returned if there is no serial number.| 
 | MIDP3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||