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

org.bouncycastle.cert.ocsp

## Class OCSPReqBuilder

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

-     public class OCSPReqBuilder
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OCSPReqBuilder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `OCSPReqBuilder` | `addRequest(CertificateID certId)` Add a request for the given CertificateID.
    `OCSPReqBuilder` | `addRequest(CertificateID certId, org.bouncycastle.asn1.x509.Extensions singleRequestExtensions)` Add a request with extensions
    `OCSPReq` | `build()` Generate an unsigned request
    `OCSPReq` | `build(ContentSigner signer, X509CertificateHolder[] chain)`
    `OCSPReqBuilder` | `setRequestExtensions(org.bouncycastle.asn1.x509.Extensions requestExtensions)`
    `OCSPReqBuilder` | `setRequestorName(org.bouncycastle.asn1.x509.GeneralName requestorName)`
    `OCSPReqBuilder` | `setRequestorName(org.bouncycastle.asn1.x500.X500Name requestorName)` Set the requestor name to the passed in X500Principal

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

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

- - ### Constructor Detail

    - #### OCSPReqBuilder

          public OCSPReqBuilder()

  - ### Method Detail

    - #### addRequest

          public OCSPReqBuilder addRequest(CertificateID certId)

      Add a request for the given CertificateID.
      Parameters:
        `certId` - certificate ID of interest

    - #### addRequest

          public OCSPReqBuilder addRequest(CertificateID certId,
                                  org.bouncycastle.asn1.x509.Extensions singleRequestExtensions)

      Add a request with extensions
      Parameters:
        `certId` - certificate ID of interest
        `singleRequestExtensions` - the extensions to attach to the request

    - #### setRequestorName

          public OCSPReqBuilder setRequestorName(org.bouncycastle.asn1.x500.X500Name requestorName)

      Set the requestor name to the passed in X500Principal
      Parameters:
        `requestorName` - a X500Principal representing the requestor name.

    - #### setRequestorName

          public OCSPReqBuilder setRequestorName(org.bouncycastle.asn1.x509.GeneralName requestorName)

    - #### setRequestExtensions

          public OCSPReqBuilder setRequestExtensions(org.bouncycastle.asn1.x509.Extensions requestExtensions)

    - #### build

          public OCSPReq build()
                        throws OCSPException

      Generate an unsigned request
      Returns:
        the OCSPReq
      Throws:
        `org.bouncycastle.ocsp.OCSPException`
        `OCSPException`

    - #### build

          public OCSPReq build(ContentSigner signer,
                      X509CertificateHolder[] chain)
                        throws OCSPException,
                               java.lang.IllegalArgumentException

      Throws:
        `OCSPException`
        `java.lang.IllegalArgumentException`