public class CertificateID
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HASH_SHA1 |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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() |
public static final java.lang.String HASH_SHA1
public CertificateID(CertID id)
public CertificateID(java.lang.String hashAlgorithm, java.security.cert.X509Certificate issuerCert, java.math.BigInteger number, java.lang.String provider) throws OCSPException
hashAlgorithm
- hash algorithm to useissuerCert
- issuing certificatenumber
- serial numberprovider
- provider to use for hashAlgorithm, null if the default one should be used.OCSPException
- if any problems occur creating the id fields.public CertificateID(java.lang.String hashAlgorithm, java.security.cert.X509Certificate issuerCert, java.math.BigInteger number) throws OCSPException
OCSPException
public java.lang.String getHashAlgOID()
public byte[] getIssuerNameHash()
public byte[] getIssuerKeyHash()
public java.math.BigInteger getSerialNumber()
public boolean matchesIssuer(java.security.cert.X509Certificate issuerCert, java.lang.String provider) throws OCSPException
OCSPException
public CertID toASN1Object()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static CertificateID deriveCertificateID(CertificateID original, java.math.BigInteger newSerialNumber)
original
- the previously calculated CertificateID for the CA.newSerialNumber
- the serial number for the new certificate of interest.