public interface CertificateResponse extends ASN1Type
Interface to be implemented by any class representing a response message for a single certificate.
The main purpose of this interface is to enforce that any
certificate response easily can be identified by the
CertID of the underlying
target certificate:
CertID ::= SEQUENCE {
hashAlgorithm AlgorithmIdentifier,
issuerNameHash OCTET STRING, -- Hash of Issuer's DN
issuerKeyHash OCTET STRING, -- Hash of Issuers public key
serialNumber CertificateSerialNumber }
| Modifier and Type | Method and Description |
|---|---|
CertID |
getCertID()
Returns the CertID of this certificate response.
|
boolean |
isResponseFor(CertID certid)
Checks if this is a certificate response for a certificate identified by the given
CertID.
|
boolean |
isResponseFor(X509Certificate targetCert,
X509Certificate issuerCert)
Checks if this is a certificate response for the given certificate identifying
information.
|
java.lang.String |
toString()
Returns a String representation of this certificate response.
|
decode, toASN1ObjectCertID getCertID()
boolean isResponseFor(X509Certificate targetCert, X509Certificate issuerCert) throws OCSPException
This method only returns true if the supplied informations
fit to CertID of this response and identify the same certificate. In any other
case this method returns false
targetCert - the target cert, if requiredissuerCert - the cert of the target cert issuer, if requiredtrue if this is a response for the target certificate
asked for; or false if this is not a response for the
target certificate in mindOCSPException - if some processing error occurs, e.g. if the certID´s
hash algorithm is not supported by the installed providersboolean isResponseFor(CertID certid)
certid - the CertID identifying the certificate in mind
true if this is a certificate response for the certificate
identified by the given CertID, false if notjava.lang.String toString()
toString in class java.lang.Object