Oracle Security Developer Tools PKI SDK OCSP Java API Reference
10g Release 2 (10.1.2.0.2)

B15562-01


oracle.security.crypto.ocsp
Class CertID

java.lang.Object
  extended byoracle.security.crypto.ocsp.CertID


public class CertID
extends java.lang.Object

Represents the certID of a certificate in OCSP.


Constructor Summary
CertID(java.io.InputStream is)
CertID(oracle.security.crypto.cert.X509 cert, oracle.security.crypto.cert.X509 caCert)
Creates a new CertID for the specified certificate having the specified issuing CA certificate, using the default hash algorithm (SHA1).
CertID(oracle.security.crypto.cert.X509 cert, oracle.security.crypto.cert.X509 caCert, AlgorithmIdentifier hashAlgID)
Creates a new CertID for the specified certificate having the specified issuing CA certificate, using the given hash algorithm.

Method Summary
boolean compareTo(oracle.security.crypto.cert.X509 cert, oracle.security.crypto.cert.X509 caCert)
Compare this object with the CertID object created from the two given certificates.
boolean compareTo(oracle.security.crypto.cert.X509 cert, oracle.security.crypto.cert.X509 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()

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CertID

public CertID(oracle.security.crypto.cert.X509 cert,
              oracle.security.crypto.cert.X509 caCert)
       throws AlgorithmIdentifierException,
              java.io.IOException
Creates a new CertID for the specified certificate having the specified issuing CA certificate, using the default hash algorithm (SHA1).

CertID

public CertID(oracle.security.crypto.cert.X509 cert,
              oracle.security.crypto.cert.X509 caCert,
              AlgorithmIdentifier hashAlgID)
       throws AlgorithmIdentifierException,
              java.io.IOException
Creates a new CertID for the specified certificate having the specified issuing CA certificate, using the given hash algorithm.

CertID

public CertID(java.io.InputStream is)
       throws java.io.IOException

Method Detail

getHashAlgID

public AlgorithmIdentifier getHashAlgID()
Gets the AlgorithmIdentifier used to hash the name and the public key of the CA.
Returns:
An AlgoritmIdentifier object representing the digest function used.

getIssuerNameHash

public byte[] getIssuerNameHash()
Returns the hash of the issuer's name.
Returns:
A byte[] representing the hash of the issuer's GeneralName.

getIssuerKeyHash

public byte[] getIssuerKeyHash()
Returns the hash of the issuer's public key.
Returns:
A byte[].

getSerialNo

public java.math.BigInteger getSerialNo()
Returns the serial number of the of the certificate represented by this certID object.
Returns:
A BigInteger representing a SerialNo.

compareTo

public boolean compareTo(oracle.security.crypto.cert.X509 cert,
                         oracle.security.crypto.cert.X509 caCert)
                  throws AlgorithmIdentifierException,
                         java.io.IOException
Compare this object with the CertID object created from the two given certificates. The hash algorithm will be SHA1 by default.
Parameters:
cert - A X509 certificate.
caCert - The issuer's certificate.
Returns:
true if this object was made from these two certificates, false otherwise.
Throws:
AlgorithmIdentifierException
java.io.IOException

compareTo

public boolean compareTo(oracle.security.crypto.cert.X509 cert,
                         oracle.security.crypto.cert.X509 caCert,
                         AlgorithmIdentifier hashAlgID)
                  throws AlgorithmIdentifierException,
                         java.io.IOException
Compare this object with the CertID object created from the two given certificates, using the given algorithm to compute the digest.
Parameters:
cert - A X509 certificate.
caCert - The issuer's certificate.
hashAlgID - The AlgorithmIdentifier to use to compute the digests.
Returns:
true if this object was made from these two certificates, false otherwise.
Throws:
AlgorithmIdentifierException
java.io.IOException

equals

public boolean equals(java.lang.Object o)
Compares this CertID object to the given object. Checks if the object is a CertID object, if the hash algorithms are the same and if the digests and serial number are the same.
Returns:
true if the objects are the same, false otherwise.

hashCode

public int hashCode()

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Throws:
java.io.IOException

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Output to the specified output stream.
Throws:
java.io.IOException

length

public int length()

toString

public java.lang.String toString()

Oracle Security Developer Tools PKI SDK OCSP Java API Reference
10g Release 2 (10.1.2.0.2)

B15562-01


Copyright © 2005 , Oracle. All rights reserved.