public abstract class Certificate extends java.lang.Object
The base class for public-key certificates.
This class is deprecated in favor of the Certificate class. It should not be used in new
applications.
| Constructor and Description |
|---|
Certificate() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other)
Tests if this certificate equals another.
|
abstract byte[] |
getEncoded()
Return the encoded form of this certificate.
|
abstract java.security.PublicKey |
getPublicKey()
Returns this certificate's public key.
|
int |
hashCode()
Computes a hash code for this certificate.
|
abstract java.lang.String |
toString()
Returns a printable representation of this certificate.
|
abstract void |
verify(java.security.PublicKey key)
Verifies the signature of this certificate.
|
abstract void |
verify(java.security.PublicKey key,
java.lang.String sigProvider)
Verifies the signature of this certificate, using the specified security
provider.
|
public Certificate()
public boolean equals(java.lang.Object other)
Tests if this certificate equals another.
equals in class java.lang.Objectother - The object to test.Object.hashCode()public int hashCode()
Computes a hash code for this certificate.
hashCode in class java.lang.ObjectObject.equals(Object),
System.identityHashCode(Object)public abstract byte[] getEncoded() throws CertificateEncodingException
Return the encoded form of this certificate.
CertificateEncodingException - If the certificate could not be
encoded.public abstract void verify(java.security.PublicKey key) throws CertificateException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.NoSuchProviderException, java.security.SignatureException
Verifies the signature of this certificate.
key - The signer's public key.CertificateExceptionjava.security.NoSuchAlgorithmException - If the algorithm used to sign the
certificate is not available.java.security.InvalidKeyException - If the supplied key is not appropriate for the
certificate's signature algorithm.java.security.NoSuchProviderExceptionjava.security.SignatureException - If the signature could not be verified.public abstract void verify(java.security.PublicKey key, java.lang.String sigProvider) throws CertificateException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.NoSuchProviderException, java.security.SignatureException
Verifies the signature of this certificate, using the specified security provider.
key - The signer's public key.sigProvider - The name of the signature provider.CertificateExceptionjava.security.NoSuchAlgorithmException - If the algorithm used to sign the
certificate is not available.java.security.InvalidKeyException - If the supplied key is not appropriate for the
certificate's signature algorithm.java.security.NoSuchProviderException - If sigProvider is not the name of an
installed provider.java.security.SignatureException - If the signature could not be verified.public abstract java.lang.String toString()
Returns a printable representation of this certificate.
toString in class java.lang.ObjectObject.getClass(),
Object.hashCode(),
Class.getName(),
Integer.toHexString(int)public abstract java.security.PublicKey getPublicKey()
Returns this certificate's public key.