All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javax.microedition.pki.Certificate Maven / Gradle / Ivy

/*

This is not an official specification document, and usage is restricted.

NOTICE


(c) 2005-2007 Sun Microsystems, Inc. All Rights Reserved.

Neither this file nor any files generated from it describe a complete specification, and they may only be used as described below. For example, no permission is given for you to incorporate this file, in whole or in part, in an implementation of a Java specification.

Sun Microsystems Inc. owns the copyright in this file and it is provided to you for informative, as opposed to normative, use. The file and any files generated from it may be used to generate other informative documentation, such as a unified set of documents of API signatures for a platform that includes technologies expressed as Java APIs. The file may also be used to produce "compilation stubs," which allow applications to be compiled and validated for such platforms.

Any work generated from this file, such as unified javadocs or compiled stub files, must be accompanied by this notice in its entirety.

This work corresponds to the API signatures of JSR 219: Foundation Profile 1.1. In the event of a discrepency between this work and the JSR 219 specification, which is available at http://www.jcp.org/en/jsr/detail?id=219, the latter takes precedence. */ package javax.microedition.pki; import java.lang.String; /** * 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

*

* For a X.509 certificate the value returned is the printable verision of * the distingished name (DN) from the certificate.

*

* An X.509 distinguished name of is set 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.

*

*

    *
  1. There is no added white space around separators.
  2. * *
  3. The attributes are in the same order as in the certificate; * attributes are not reordered.
  4. * *
  5. If an object ID is in the table below, the label from the table * will be substituted for the object ID, else the ID is formatted as * a string using the binary printable representation above.
  6. * *
  7. Each object ID or label and value within an attribute will be * separated by a "=" (Unicode U+003D), even if the value is empty.
  8. * *
  9. If value is not a string, then it is formatted as a string using the * binary printable representation above.
  10. * *
  11. Attributes will be separated by a ";" (Unicode U+003B)
  12. *
*

*
Labels for X.500 Distinguished Name Attributes * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Object IDBinaryLabel
id-at-commonName55:04:03CN
id-at-surname55:04:04SN
id-at-countryName55:04:06C
id-at-localityName55:04:07L
id-at-stateOrProvinceName55:04:08ST
id-at-streetAddress55:04:09STREET
id-at-organizationName55:04:0AO
id-at-organizationUnitName55:04:0BOU
emailAddress2A:86:48:86:F7:0D:01:09:01EmailAddress
*

* Example of a printable distinguished name:

*
* C=US;O=Any Company, Inc.;CN=www.anycompany.com
* * @since MIDP 2.0 */ public interface Certificate { /** * Gets the name of this certificate's subject. * @return The subject of this Certificate; * the value MUST NOT be null. */ public java.lang.String getSubject(); /** * Gets the name of this certificate's issuer. * @return The issuer of the Certificate; * the value MUST NOT be null. */ public java.lang.String getIssuer(); /** * Get the type of the Certificate. * For X.509 Certificates the value returned is "X.509". * * @return The type of the Certificate; * the value MUST NOT be null. */ public java.lang.String getType(); /** * Gets the version number of this Certificate. * The format of the version number depends on the specific * type and specification. * For a X.509 certificate per RFC 2459 it would be "2". * @return The version number of the Certificate; * the value MUST NOT be null. */ public java.lang.String getVersion(); /** * Gets the name of the algorithm used to sign the * Certificate. * The algorithm names returned should be the labels * defined in RFC2459 Section 7.2. * @return The name of signature algorithm; * the value MUST NOT be null. */ public java.lang.String getSigAlgName(); /** * Gets the time before which this Certificate may not be used * from the validity period. * * @return The time in milliseconds before which the * Certificate is not valid; it MUST be positive, * 0 is returned if the certificate does not * have its validity restricted based on the time. */ public long getNotBefore(); /** * Gets the time after which this Certificate may not be used * from the validity period. * @return The time in milliseconds after which the * 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. */ public long getNotAfter(); /** * Gets the printable form of the serial number of this * 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. * @return A string containing the serial number * in user-friendly form; null is returned * if there is no serial number. */ public java.lang.String getSerialNumber(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy