BasicOCSPResp (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.cert.ocsp

## Class BasicOCSPResp

- java.lang.Object
- - org.bouncycastle.cert.ocsp.BasicOCSPResp

- All Implemented Interfaces:
    org.bouncycastle.util.Encodable

      public class BasicOCSPResp
      extends java.lang.Object
      implements org.bouncycastle.util.Encodable

       BasicOCSPResponse       ::= SEQUENCE {
          tbsResponseData      ResponseData,
          signatureAlgorithm   AlgorithmIdentifier,
          signature            BIT STRING,
          certs                [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicOCSPResp(org.bouncycastle.asn1.ocsp.BasicOCSPResponse resp)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)`
    `X509CertificateHolder[]` | `getCerts()`
    `java.util.Set` | `getCriticalExtensionOIDs()`
    `byte[]` | `getEncoded()` return the ASN.1 encoded representation of this object.
    `org.bouncycastle.asn1.x509.Extension` | `getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)`
    `java.util.List` | `getExtensionOIDs()`
    `java.util.Set` | `getNonCriticalExtensionOIDs()`
    `java.util.Date` | `getProducedAt()`
    `RespID` | `getResponderId()`
    `SingleResp[]` | `getResponses()`
    `byte[]` | `getSignature()`
    `org.bouncycastle.asn1.ASN1ObjectIdentifier` | `getSignatureAlgOID()`
    `org.bouncycastle.asn1.x509.AlgorithmIdentifier` | `getSignatureAlgorithmID()` Return the algorithm identifier describing the signature used in the response.
    `byte[]` | `getTBSResponseData()` Return the DER encoding of the tbsResponseData field.
    `int` | `getVersion()`
    `boolean` | `hasExtensions()`
    `int` | `hashCode()`
    `boolean` | `isSignatureValid(ContentVerifierProvider verifierProvider)` verify the signature against the tbsResponseData object we contain.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BasicOCSPResp

          public BasicOCSPResp(org.bouncycastle.asn1.ocsp.BasicOCSPResponse resp)

  - ### Method Detail

    - #### getTBSResponseData

          public byte[] getTBSResponseData()

      Return the DER encoding of the tbsResponseData field.
      Returns:
        DER encoding of tbsResponseData

    - #### getSignatureAlgorithmID

          public org.bouncycastle.asn1.x509.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 java.util.Date getProducedAt()

    - #### getResponses

          public SingleResp[] getResponses()

    - #### hasExtensions

          public boolean hasExtensions()

    - #### getExtension

          public org.bouncycastle.asn1.x509.Extension getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)

    - #### getExtensionOIDs

          public java.util.List getExtensionOIDs()

    - #### getCriticalExtensionOIDs

          public java.util.Set getCriticalExtensionOIDs()

    - #### getNonCriticalExtensionOIDs

          public java.util.Set getNonCriticalExtensionOIDs()

    - #### getSignatureAlgOID

          public org.bouncycastle.asn1.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 java.io.IOException

      return the ASN.1 encoded representation of this object.
      Specified by:
        `getEncoded` in interface `org.bouncycastle.util.Encodable`
      Throws:
        `java.io.IOException`

    - #### 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`