org.bouncycastle.ocsp

Class BasicOCSPResp

public class BasicOCSPResp extends Object implements X509Extension

 BasicOCSPResponse       ::= SEQUENCE {
    tbsResponseData      ResponseData,
    signatureAlgorithm   AlgorithmIdentifier,
    signature            BIT STRING,
    certs                [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }
 
Constructor Summary
BasicOCSPResp(BasicOCSPResponse resp)
Method Summary
booleanequals(Object o)
CertStoregetCertificates(String type, String provider)
Return the certificates, if any associated with the response.
X509Certificate[]getCerts(String provider)
SetgetCriticalExtensionOIDs()
byte[]getEncoded()
return the ASN.1 encoded representation of this object.
byte[]getExtensionValue(String oid)
SetgetNonCriticalExtensionOIDs()
DategetProducedAt()
RespIDgetResponderId()
RespDatagetResponseData()
X509ExtensionsgetResponseExtensions()
SingleResp[]getResponses()
byte[]getSignature()
StringgetSignatureAlgName()
StringgetSignatureAlgOID()
byte[]getTBSResponseData()
Return the DER encoding of the tbsResponseData field.
intgetVersion()
inthashCode()
booleanhasUnsupportedCriticalExtension()
RFC 2650 doesn't specify any critical extensions so we return true if any are encountered.
booleanverify(PublicKey key, String sigProvider)
verify the signature against the tbsResponseData object we contain.

Constructor Detail

BasicOCSPResp

public BasicOCSPResp(BasicOCSPResponse resp)

Method Detail

equals

public boolean equals(Object o)

getCertificates

public CertStore getCertificates(String type, String provider)
Return the certificates, if any associated with the response.

Parameters: type type of CertStore to create provider provider to use

Returns: a CertStore, possibly empty

Throws: NoSuchAlgorithmException NoSuchProviderException OCSPException

getCerts

public X509Certificate[] getCerts(String provider)

getCriticalExtensionOIDs

public Set getCriticalExtensionOIDs()

getEncoded

public byte[] getEncoded()
return the ASN.1 encoded representation of this object.

getExtensionValue

public byte[] getExtensionValue(String oid)

getNonCriticalExtensionOIDs

public Set getNonCriticalExtensionOIDs()

getProducedAt

public Date getProducedAt()

getResponderId

public RespID getResponderId()

getResponseData

public RespData getResponseData()

Deprecated: RespData class is no longer required as all functionality is available on this class.

Returns: the RespData object

getResponseExtensions

public X509Extensions getResponseExtensions()

getResponses

public SingleResp[] getResponses()

getSignature

public byte[] getSignature()

getSignatureAlgName

public String getSignatureAlgName()

getSignatureAlgOID

public String getSignatureAlgOID()

getTBSResponseData

public byte[] getTBSResponseData()
Return the DER encoding of the tbsResponseData field.

Returns: DER encoding of tbsResponseData

Throws: OCSPException in the event of an encoding error.

getVersion

public int getVersion()

hashCode

public int hashCode()

hasUnsupportedCriticalExtension

public boolean hasUnsupportedCriticalExtension()
RFC 2650 doesn't specify any critical extensions so we return true if any are encountered.

Returns: true if any critical extensions are present.

verify

public boolean verify(PublicKey key, String sigProvider)
verify the signature against the tbsResponseData object we contain.