Skip to content

Most visited

Recently visited

navigation
Added in API level 1
Deprecated since API level 1

Certificate

public interface Certificate

java.security.Certificate


This interface was deprecated in API level 1.
Use Certificate instead.

Certificate represents an identity certificate, such as X.509 or PGP. Note: A Certificate instances does not make any statement about the validity of itself. It's in the responsibility of the application to verify the validity of its certificates.

See also:

Summary

Public methods

abstract void decode(InputStream stream)

Decodes a certificate from the given InputStream.

abstract void encode(OutputStream stream)

Encodes this certificate to an output stream.

abstract String getFormat()

Returns a string identifying the format of this certificate.

abstract Principal getGuarantor()

Returns the guarantor of this certificate.

abstract Principal getPrincipal()

Returns the principal of this certificate.

abstract PublicKey getPublicKey()

Returns the public key of this certificate.

abstract String toString(boolean detailed)

Returns a string containing a concise, human-readable description of the this Certificate.

Public methods

decode

Added in API level 1
void decode (InputStream stream)

Decodes a certificate from the given InputStream. The format of the data to encode must be that identified by getFormat() and encoded by encode(OutputStream).

Parameters
stream InputStream: the InputStream to read from.
Throws
KeyException if certificate information is incomplete or incorrect.
IOException if an exception is thrown by accessing the provided stream.

See also:

encode

Added in API level 1
void encode (OutputStream stream)

Encodes this certificate to an output stream. The decode(InputStream) method must be able to decode the format written by this method.

Parameters
stream OutputStream: the OutputStream to encode this certificate to.
Throws
KeyException if certificate information is incomplete or incorrect.
IOException if an exception is thrown by accessing the provided stream.

See also:

getFormat

Added in API level 1
String getFormat ()

Returns a string identifying the format of this certificate.

Returns
String a string identifying the format of this certificate.

getGuarantor

Added in API level 1
Principal getGuarantor ()

Returns the guarantor of this certificate. That guarantor guarantees, that the public key of this certificate is from the principal returned by getPrincipal().

Returns
Principal the guarantor of this certificate.

See also:

getPrincipal

Added in API level 1
Principal getPrincipal ()

Returns the principal of this certificate. The principal is guaranteed by the guarantor returned by getGuarantor().

Returns
Principal the principal of this certificate.

See also:

getPublicKey

Added in API level 1
PublicKey getPublicKey ()

Returns the public key of this certificate. The public key is guaranteed by the guarantor to belong to the principal.

Returns
PublicKey the public key of this certificate.

See also:

toString

Added in API level 1
String toString (boolean detailed)

Returns a string containing a concise, human-readable description of the this Certificate.

Parameters
detailed boolean: whether or not this method should return detailed information.
Returns
String a string representation of this certificate.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.