Class Certificate

java.lang.Object
java.security.cert.Certificate
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
X509Certificate

public abstract class Certificate
extends Object
implements Serializable
Abstract class to represent identity certificates. It represents a way to verify the binding of a Principal and its public key. Examples are X.509, PGP, and SDSI.
See Also:
Serialized Form
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    protected static class  Certificate.CertificateRep
    The alternate Serializable class to be used for serialization and deserialization of Certificate objects.
  • Constructor Summary

    Constructors
    Modifier Constructor Description
    protected Certificate​(String type)
    Creates a new Certificate with the specified type.
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(Object other)
    Compares the argument to the certificate, and returns true if they represent the same object using a class specific comparison.
    abstract byte[] getEncoded()
    Returns the encoded representation for this certificate.
    abstract PublicKey getPublicKey()
    Returns the public key corresponding to this certificate.
    String getType()
    Returns the certificate type.
    int hashCode()
    Returns an integer hash code for the certificate.
    abstract String toString()
    Returns a string containing a concise, human-readable description of the certificate.
    abstract void verify​(PublicKey key)
    Verifies that this certificate was signed with the given public key.
    abstract void verify​(PublicKey key, String sigProvider)
    Verifies that this certificate was signed with the given public key.
    protected Object writeReplace()
    Returns an alternate object to be serialized.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Certificate

      protected Certificate​(String type)
      Creates a new Certificate with the specified type.
      Parameters:
      type - the certificate type.
  • Method Details