public class CertID
extends java.lang.Object
| Constructor and Description |
|---|
CertID(java.io.InputStream is) |
CertID(java.security.cert.X509Certificate cert,
java.security.cert.X509Certificate caCert)
Creates a new
CertID for the specified certificate
having the specified issuing CA certificate, using the default
hash algorithm (SHA1). |
CertID(java.security.cert.X509Certificate cert,
java.security.cert.X509Certificate caCert,
AlgorithmIdentifier hashAlgID)
Creates a new
CertID for the specified certificate
having the specified issuing CA certificate, using the given
hash algorithm. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareTo(java.security.cert.X509Certificate cert,
java.security.cert.X509Certificate caCert)
Compare this object with the CertID object created from the two given certificates.
|
boolean |
compareTo(java.security.cert.X509Certificate cert,
java.security.cert.X509Certificate caCert,
AlgorithmIdentifier hashAlgID)
Compare this object with the CertID object created from the two given certificates,
using the given algorithm to compute the digest.
|
boolean |
equals(java.lang.Object o)
Compares this CertID object to the given object.
|
AlgorithmIdentifier |
getHashAlgID()
Gets the AlgorithmIdentifier used to hash the name and the public
key of the CA.
|
byte[] |
getIssuerKeyHash()
Returns the hash of the issuer's public key.
|
byte[] |
getIssuerNameHash()
Returns the hash of the issuer's name.
|
java.math.BigInteger |
getSerialNo()
Returns the serial number of the of the certificate represented by this certID object.
|
int |
hashCode() |
void |
input(java.io.InputStream is) |
int |
length() |
void |
output(java.io.OutputStream os)
Output to the specified output stream.
|
java.lang.String |
toString() |
public CertID(java.security.cert.X509Certificate cert,
java.security.cert.X509Certificate caCert)
throws java.security.NoSuchAlgorithmException,
java.security.cert.CertificateEncodingException
CertID for the specified certificate
having the specified issuing CA certificate, using the default
hash algorithm (SHA1).
Note the changes in the method signature
Previously public CertID (X509 , X509 )
Now public CertID (X509Certificate , X509Certificate )
Note the change in the exceptions declared to be thrown.
Exceptions no longer thrown - AlgorithmIdentifierException
Exceptions introduced - NoSuchAlgorithmException, CertificateEncodingException
java.security.NoSuchAlgorithmExceptionjava.security.cert.CertificateEncodingExceptionpublic CertID(java.security.cert.X509Certificate cert,
java.security.cert.X509Certificate caCert,
AlgorithmIdentifier hashAlgID)
throws java.security.NoSuchAlgorithmException,
java.security.cert.CertificateEncodingException
CertID for the specified certificate
having the specified issuing CA certificate, using the given
hash algorithm.
Note the changes in the method signature
Previously public CertID (X509 , X509 ,AlgorithmIdentifier)
Now public CertID (X509Certificate , X509Certificate,AlgorithmIdentifier )
Note the change in the exceptions declared to be thrown.
Exceptions no longer thrown - AlgorithmIdentifierException
Exceptions introduced - NoSuchAlgorithmException, CertificateEncodingException
java.security.NoSuchAlgorithmExceptionjava.security.cert.CertificateEncodingExceptionpublic CertID(java.io.InputStream is)
throws java.io.IOException
java.io.IOExceptionpublic AlgorithmIdentifier getHashAlgID()
public byte[] getIssuerNameHash()
public byte[] getIssuerKeyHash()
public java.math.BigInteger getSerialNo()
public boolean compareTo(java.security.cert.X509Certificate cert,
java.security.cert.X509Certificate caCert)
throws java.security.NoSuchAlgorithmException,
java.security.cert.CertificateEncodingException
Note the changes in the method signature
Previously public boolean compareTo (X509, X509)
Now public boolean compareTo (X509Certificate, X509Certificate)
Note the change in the exceptions declared to be thrown.
Exceptions no longer thrown - AlgorithmIdentifierException
Exceptions introduced - NoSuchAlgorithmException, CertificateEncodingException
cert - A X509 certificate.caCert - The issuer's certificate.java.security.NoSuchAlgorithmExceptionjava.security.cert.CertificateEncodingExceptionpublic boolean compareTo(java.security.cert.X509Certificate cert,
java.security.cert.X509Certificate caCert,
AlgorithmIdentifier hashAlgID)
throws java.security.NoSuchAlgorithmException,
java.security.cert.CertificateEncodingException
Note the changes in the method signature
Previously public boolean compareTo (X509, X509,AlgorithmIdentifier)
Now public boolean compareTo (X509Certificate, X509Certificate,AlgorithmIdentifier)
Note the change in the exceptions declared to be thrown.
Exceptions no longer thrown - AlgorithmIdentifierException
Exceptions introduced - NoSuchAlgorithmException, CertificateEncodingException
cert - A X509 certificate.caCert - The issuer's certificate.hashAlgID - The AlgorithmIdentifier to use to compute the digests.java.security.NoSuchAlgorithmExceptionjava.security.cert.CertificateEncodingExceptionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void input(java.io.InputStream is)
throws java.io.IOException
java.io.IOExceptionpublic void output(java.io.OutputStream os)
throws java.io.IOException
java.io.IOExceptionpublic int length()
public java.lang.String toString()
toString in class java.lang.Object