Bouncy Castle Cryptography 1.46

org.bouncycastle.ocsp
Class CertificateID

java.lang.Object
  extended by org.bouncycastle.ocsp.CertificateID

public class CertificateID
extends java.lang.Object


Field Summary
static java.lang.String HASH_SHA1
           
 
Constructor Summary
CertificateID(CertID id)
           
CertificateID(java.lang.String hashAlgorithm, java.security.cert.X509Certificate issuerCert, java.math.BigInteger number)
          create using the BC provider
CertificateID(java.lang.String hashAlgorithm, java.security.cert.X509Certificate issuerCert, java.math.BigInteger number, java.lang.String provider)
          create from an issuer certificate and the serial number of the certificate it signed.
 
Method Summary
static CertificateID deriveCertificateID(CertificateID original, java.math.BigInteger newSerialNumber)
          Create a new CertificateID for a new serial number derived from a previous one calculated for the same CA certificate.
 boolean equals(java.lang.Object o)
           
 java.lang.String getHashAlgOID()
           
 byte[] getIssuerKeyHash()
           
 byte[] getIssuerNameHash()
           
 java.math.BigInteger getSerialNumber()
          return the serial number for the certificate associated with this request.
 int hashCode()
           
 boolean matchesIssuer(java.security.cert.X509Certificate issuerCert, java.lang.String provider)
           
 CertID toASN1Object()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HASH_SHA1

public static final java.lang.String HASH_SHA1
See Also:
Constant Field Values
Constructor Detail

CertificateID

public CertificateID(CertID id)

CertificateID

public CertificateID(java.lang.String hashAlgorithm,
                     java.security.cert.X509Certificate issuerCert,
                     java.math.BigInteger number,
                     java.lang.String provider)
              throws OCSPException
create from an issuer certificate and the serial number of the certificate it signed.

Parameters:
hashAlgorithm - hash algorithm to use
issuerCert - issuing certificate
number - serial number
provider - provider to use for hashAlgorithm, null if the default one should be used.
Throws:
OCSPException - if any problems occur creating the id fields.

CertificateID

public CertificateID(java.lang.String hashAlgorithm,
                     java.security.cert.X509Certificate issuerCert,
                     java.math.BigInteger number)
              throws OCSPException
create using the BC provider

Throws:
OCSPException
Method Detail

getHashAlgOID

public java.lang.String getHashAlgOID()

getIssuerNameHash

public byte[] getIssuerNameHash()

getIssuerKeyHash

public byte[] getIssuerKeyHash()

getSerialNumber

public java.math.BigInteger getSerialNumber()
return the serial number for the certificate associated with this request.


matchesIssuer

public boolean matchesIssuer(java.security.cert.X509Certificate issuerCert,
                             java.lang.String provider)
                      throws OCSPException
Throws:
OCSPException

toASN1Object

public CertID toASN1Object()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

deriveCertificateID

public static CertificateID deriveCertificateID(CertificateID original,
                                                java.math.BigInteger newSerialNumber)
Create a new CertificateID for a new serial number derived from a previous one calculated for the same CA certificate.

Parameters:
original - the previously calculated CertificateID for the CA.
newSerialNumber - the serial number for the new certificate of interest.
Returns:
a new CertificateID for newSerialNumber

Bouncy Castle Cryptography 1.46