Class BasicOCSPResp

java.lang.Object
org.bouncycastle.cert.ocsp.BasicOCSPResp
All Implemented Interfaces:
Encodable

public class BasicOCSPResp extends Object implements Encodable
OCSP RFC 2560, RFC 6960
 BasicOCSPResponse       ::= SEQUENCE {
    tbsResponseData      ResponseData,
    signatureAlgorithm   AlgorithmIdentifier,
    signature            BIT STRING,
    certs                [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }
 
  • Constructor Details

  • Method Details

    • getTBSResponseData

      public byte[] getTBSResponseData()
      Return the DER encoding of the tbsResponseData field.
      Returns:
      DER encoding of tbsResponseData
    • getSignatureAlgorithmID

      public AlgorithmIdentifier getSignatureAlgorithmID()
      Return the algorithm identifier describing the signature used in the response.
      Returns:
      an AlgorithmIdentifier
    • getVersion

      public int getVersion()
    • getResponderId

      public RespID getResponderId()
    • getProducedAt

      public Date getProducedAt()
    • getResponses

      public SingleResp[] getResponses()
    • hasExtensions

      public boolean hasExtensions()
    • getExtension

      public Extension getExtension(ASN1ObjectIdentifier oid)
    • getExtensionOIDs

      public List getExtensionOIDs()
    • getCriticalExtensionOIDs

      public Set getCriticalExtensionOIDs()
    • getNonCriticalExtensionOIDs

      public Set getNonCriticalExtensionOIDs()
    • getSignatureAlgOID

      public ASN1ObjectIdentifier getSignatureAlgOID()
    • getSignature

      public byte[] getSignature()
    • getCerts

      public X509CertificateHolder[] getCerts()
    • isSignatureValid

      public boolean isSignatureValid(ContentVerifierProvider verifierProvider) throws OCSPException
      verify the signature against the tbsResponseData object we contain.
      Throws:
      OCSPException
    • getEncoded

      public byte[] getEncoded() throws IOException
      return the ASN.1 encoded representation of this object.
      Specified by:
      getEncoded in interface Encodable
      Returns:
      a byte array representing the encoding.
      Throws:
      IOException - if an issue arises generation the encoding.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object