Class BasicOCSPRespBuilder

java.lang.Object
org.bouncycastle.cert.ocsp.BasicOCSPRespBuilder
Direct Known Subclasses:
JcaBasicOCSPRespBuilder

public class BasicOCSPRespBuilder extends Object
Generator for basic OCSP response objects.
  • Constructor Details

    • 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 Details

    • 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, Date nextUpdate, 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
      nextUpdate - date when next update should be requested
      singleExtensions - optional extensions
    • addResponse

      public BasicOCSPRespBuilder addResponse(CertificateID certID, CertificateStatus certStatus, Date thisUpdate, Date nextUpdate)
      Add a response for a particular Certificate ID.
      Parameters:
      certID - certificate ID details
      certStatus - status of the certificate - null if okay
      thisUpdate - date this response was valid on
      nextUpdate - date when next update should be requested
    • addResponse

      public BasicOCSPRespBuilder addResponse(CertificateID certID, CertificateStatus certStatus, Date thisUpdate, Date nextUpdate, 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
      thisUpdate - date this response was valid on
      nextUpdate - date when next update should be requested
      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, Date producedAt) throws OCSPException
      Throws:
      OCSPException