BasicOCSPRespBuilder (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.cert.ocsp

## Class BasicOCSPRespBuilder

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

- Direct Known Subclasses:
    JcaBasicOCSPRespBuilder

      public class BasicOCSPRespBuilder
      extends java.lang.Object

  Generator for basic OCSP response objects.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicOCSPRespBuilder(RespID responderID)` basic constructor
    `BasicOCSPRespBuilder(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo key, DigestCalculator digCalc)` construct with the responderID to be the SHA-1 keyHash of the passed in public key.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `BasicOCSPRespBuilder` | `addResponse(CertificateID certID, CertificateStatus certStatus)` Add a response for a particular Certificate ID.
    `BasicOCSPRespBuilder` | `addResponse(CertificateID certID, CertificateStatus certStatus, java.util.Date thisUpdate, java.util.Date nextUpdate)` Add a response for a particular Certificate ID.
    `BasicOCSPRespBuilder` | `addResponse(CertificateID certID, CertificateStatus certStatus, java.util.Date thisUpdate, java.util.Date nextUpdate, org.bouncycastle.asn1.x509.Extensions singleExtensions)` Add a response for a particular Certificate ID.
    `BasicOCSPRespBuilder` | `addResponse(CertificateID certID, CertificateStatus certStatus, java.util.Date nextUpdate, org.bouncycastle.asn1.x509.Extensions singleExtensions)` Add a response for a particular Certificate ID.
    `BasicOCSPRespBuilder` | `addResponse(CertificateID certID, CertificateStatus certStatus, org.bouncycastle.asn1.x509.Extensions singleExtensions)` Add a response for a particular Certificate ID.
    `BasicOCSPResp` | `build(ContentSigner signer, X509CertificateHolder[] chain, java.util.Date producedAt)`
    `BasicOCSPRespBuilder` | `setResponseExtensions(org.bouncycastle.asn1.x509.Extensions responseExtensions)` Set the extensions for the response.

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

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

- - ### Constructor Detail

    - #### BasicOCSPRespBuilder

          public BasicOCSPRespBuilder(RespID responderID)

      basic constructor

    - #### BasicOCSPRespBuilder

          public BasicOCSPRespBuilder(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo key,
                              DigestCalculator digCalc)
                               throws OCSPException

      construct with the responderID to be the SHA-1 keyHash of the passed in public key.
      Parameters:
        `key` - the key info of the responder public key.
        `digCalc` - a SHA-1 digest calculator
      Throws:
        `OCSPException`

  - ### Method Detail

    - #### addResponse

          public BasicOCSPRespBuilder addResponse(CertificateID certID,
                                         CertificateStatus certStatus)

      Add a response for a particular Certificate ID.
      Parameters:
        `certID` - certificate ID details
        `certStatus` - status of the certificate - null if okay

    - #### addResponse

          public BasicOCSPRespBuilder addResponse(CertificateID certID,
                                         CertificateStatus certStatus,
                                         org.bouncycastle.asn1.x509.Extensions singleExtensions)

      Add a response for a particular Certificate ID.
      Parameters:
        `certID` - certificate ID details
        `certStatus` - status of the certificate - null if okay
        `singleExtensions` - optional extensions

    - #### addResponse

          public BasicOCSPRespBuilder addResponse(CertificateID certID,
                                         CertificateStatus certStatus,
                                         java.util.Date nextUpdate,
                                         org.bouncycastle.asn1.x509.Extensions singleExtensions)

      Add a response for a particular Certificate ID.
      Parameters:
        `certID` - certificate ID details
        `nextUpdate` - date when next update should be requested
        `certStatus` - status of the certificate - null if okay
        `singleExtensions` - optional extensions

    - #### addResponse

          public BasicOCSPRespBuilder addResponse(CertificateID certID,
                                         CertificateStatus certStatus,
                                         java.util.Date thisUpdate,
                                         java.util.Date nextUpdate)

      Add a response for a particular Certificate ID.
      Parameters:
        `certID` - certificate ID details
        `thisUpdate` - date this response was valid on
        `nextUpdate` - date when next update should be requested
        `certStatus` - status of the certificate - null if okay

    - #### addResponse

          public BasicOCSPRespBuilder addResponse(CertificateID certID,
                                         CertificateStatus certStatus,
                                         java.util.Date thisUpdate,
                                         java.util.Date nextUpdate,
                                         org.bouncycastle.asn1.x509.Extensions singleExtensions)

      Add a response for a particular Certificate ID.
      Parameters:
        `certID` - certificate ID details
        `thisUpdate` - date this response was valid on
        `nextUpdate` - date when next update should be requested
        `certStatus` - status of the certificate - null if okay
        `singleExtensions` - optional extensions

    - #### setResponseExtensions

          public BasicOCSPRespBuilder setResponseExtensions(org.bouncycastle.asn1.x509.Extensions responseExtensions)

      Set the extensions for the response.
      Parameters:
        `responseExtensions` - the extension object to carry.

    - #### build

          public BasicOCSPResp build(ContentSigner signer,
                            X509CertificateHolder[] chain,
                            java.util.Date producedAt)
                              throws OCSPException

      Throws:
        `OCSPException`