java.security
Interface Certificate


public interface Certificate

Untamed:


Method Summary
 void decode(InputStream stream)
          Enabled: Decodes a certificate from an input stream.
 void encode(OutputStream stream)
          Enabled: Encodes the certificate to an output stream in a format that can be decoded by the decode method.
 String getFormat()
          Enabled: Returns the name of the coding format.
 Principal getGuarantor()
          Enabled: Returns the guarantor of the certificate, that is, the principal guaranteeing that the public key associated with this certificate is that of the principal associated with this certificate.
 Principal getPrincipal()
          Enabled: Returns the principal of the principal-key pair being guaranteed by the guarantor.
 PublicKey getPublicKey()
          Enabled: Returns the key of the principal-key pair being guaranteed by the guarantor.
 String toString(boolean detailed)
          Enabled: Returns a string that represents the contents of the certificate.
 

Method Detail

getGuarantor

public Principal getGuarantor()
Enabled: Returns the guarantor of the certificate, that is, the principal guaranteeing that the public key associated with this certificate is that of the principal associated with this certificate. For X.509 certificates, the guarantor will typically be a Certificate Authority (such as the United States Postal Service or Verisign, Inc.).

Returns:
the guarantor which guaranteed the principal-key binding.

getPrincipal

public Principal getPrincipal()
Enabled: Returns the principal of the principal-key pair being guaranteed by the guarantor.

Returns:
the principal to which this certificate is bound.

getPublicKey

public PublicKey getPublicKey()
Enabled: Returns the key of the principal-key pair being guaranteed by the guarantor.

Returns:
the public key that this certificate certifies belongs to a particular principal.

encode

public void encode(OutputStream stream)
            throws KeyException,
                   IOException
Enabled: Encodes the certificate to an output stream in a format that can be decoded by the decode method.

Parameters:
stream - the output stream to which to encode the certificate.
KeyException
IOException
See Also:
decode(java.io.InputStream), getFormat()

decode

public void decode(InputStream stream)
            throws KeyException,
                   IOException
Enabled: Decodes a certificate from an input stream. The format should be that returned by getFormat and produced by encode.

Parameters:
stream - the input stream from which to fetch the data being decoded.
KeyException
IOException
See Also:
encode(java.io.OutputStream), getFormat()

getFormat

public String getFormat()
Enabled: Returns the name of the coding format. This is used as a hint to find an appropriate parser. It could be "X.509", "PGP", etc. This is the format produced and understood by the encode and decode methods.

Returns:
the name of the coding format.

toString

public String toString(boolean detailed)
Enabled: Returns a string that represents the contents of the certificate.

Parameters:
detailed - whether or not to give detailed information about the certificate
Returns:
a string representing the contents of the certificate


comments?