public class

CertId

extends Object
java.lang.Object
   ↳ sun.security.provider.certpath.CertId

Class Overview

This class corresponds to the CertId field in OCSP Request and the OCSP Response. The ASN.1 definition for CertID is defined in RFC 2560 as:


 CertID          ::=     SEQUENCE {
      hashAlgorithm       AlgorithmIdentifier,
      issuerNameHash      OCTET STRING, -- Hash of Issuer's DN
      issuerKeyHash       OCTET STRING, -- Hash of Issuers public key
      serialNumber        CertificateSerialNumber
      }

 

Summary

Public Constructors
CertId(X509Certificate issuerCert, SerialNumber serialNumber)
Creates a CertId.
CertId(DerInputStream derIn)
Creates a CertId from its ASN.1 DER encoding.
Public Methods
void encode(DerOutputStream out)
Encode the CertId using ASN.1 DER.
boolean equals(Object other)
Compares this CertId for equality with the specified object.
AlgorithmId getHashAlgorithm()
Return the hash algorithm identifier.
byte[] getIssuerKeyHash()
Return the hash value for the issuer key.
byte[] getIssuerNameHash()
Return the hash value for the issuer name.
BigInteger getSerialNumber()
Return the serial number.
int hashCode()
Returns a hashcode value for this CertId.
String toString()
Create a string representation of the CertId.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CertId (X509Certificate issuerCert, SerialNumber serialNumber)

Creates a CertId. The hash algorithm used is SHA-1.

Throws
IOException

public CertId (DerInputStream derIn)

Creates a CertId from its ASN.1 DER encoding.

Throws
IOException

Public Methods

public void encode (DerOutputStream out)

Encode the CertId using ASN.1 DER. The hash algorithm used is SHA-1.

Throws
IOException

public boolean equals (Object other)

Compares this CertId for equality with the specified object. Two CertId objects are considered equal if their hash algorithms, their issuer name and issuer key hash values and their serial numbers are equal.

Parameters
other the object to test for equality with this object.
Returns
  • true if the objects are considered equal, false otherwise.

public AlgorithmId getHashAlgorithm ()

Return the hash algorithm identifier.

public byte[] getIssuerKeyHash ()

Return the hash value for the issuer key.

public byte[] getIssuerNameHash ()

Return the hash value for the issuer name.

public BigInteger getSerialNumber ()

Return the serial number.

public int hashCode ()

Returns a hashcode value for this CertId.

Returns
  • the hashcode value.

public String toString ()

Create a string representation of the CertId.

Returns
  • a string representation of the object.