Class OCSPRespBuilder


  • public class OCSPRespBuilder
    extends Object
    Generator for OCSP response objects.
    Since:
    2.0.0
    Author:
    Lijun Liao (xipki)
    • Constructor Detail

      • OCSPRespBuilder

        public OCSPRespBuilder​(ResponderID responderId)
        basic constructor.
        Parameters:
        responderId - Responder ID
    • Method Detail

      • addResponse

        public void addResponse​(CertID certId,
                                byte[] certStatus,
                                Instant thisUpdate,
                                Instant nextUpdate,
                                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 void setResponseExtensions​(Extensions responseExtensions)
        Set the extensions for the response.
        Parameters:
        responseExtensions - the extension object to carry.
      • buildOCSPResponse

        public byte[] buildOCSPResponse​(org.xipki.security.ConcurrentContentSigner signer,
                                        TaggedCertSequence taggedCertSequence,
                                        Instant producedAt)
                                 throws org.bouncycastle.cert.ocsp.OCSPException,
                                        org.xipki.security.NoIdleSignerException
        Throws:
        org.bouncycastle.cert.ocsp.OCSPException
        org.xipki.security.NoIdleSignerException