Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools PKI SDK OCSP Java API Reference 10g Release 3 (10.1.3) B25375-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.ocsp
Class CertID

`java.lang.Object
oracle.security.crypto.ocsp.CertID`

All Implemented Interfaces:
  oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class CertID
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object

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, oracle.security.crypto.core.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, oracle.security.crypto.core.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.
`oracle.security.crypto.core.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 oracle.security.crypto.core.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,
                  oracle.security.crypto.core.AlgorithmIdentifier hashAlgID)
           throws oracle.security.crypto.core.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 oracle.security.crypto.core.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 oracle.security.crypto.core.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:
    `oracle.security.crypto.core.AlgorithmIdentifierException`
    `java.io.IOException`

### compareTo

    public boolean compareTo(oracle.security.crypto.cert.X509 cert,
                             oracle.security.crypto.cert.X509 caCert,
                             oracle.security.crypto.core.AlgorithmIdentifier hashAlgID)
                      throws oracle.security.crypto.core.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:
    `oracle.security.crypto.core.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

  Specified by:
    `input` in interface `oracle.security.crypto.util.Streamable`
  Throws:
    `java.io.IOException`

### output

    public void output(java.io.OutputStream os)
                throws java.io.IOException

  Output to the specified output stream.
  Specified by:
    `output` in interface `oracle.security.crypto.util.Streamable`
  Throws:
    `java.io.IOException`

### length

    public int length()

  Specified by:
    `length` in interface `oracle.security.crypto.util.Streamable`

### toString

    public java.lang.String toString()

Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools PKI SDK OCSP Java API Reference 10g Release 3 (10.1.3) B25375-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, 2006 , Oracle. All rights reserved.