Package 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 Description BasicOCSPRespBuilder(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo key, org.bouncycastle.operator.DigestCalculator digCalc)
construct with the responderID to be the SHA-1 keyHash of the passed in public key.BasicOCSPRespBuilder(RespID responderID)
basic constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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(org.bouncycastle.operator.ContentSigner signer, X509CertificateHolder[] chain, java.util.Date producedAt)
BasicOCSPRespBuilder
setResponseExtensions(org.bouncycastle.asn1.x509.Extensions responseExtensions)
Set the extensions for the response.
-
-
-
Constructor Detail
-
BasicOCSPRespBuilder
public BasicOCSPRespBuilder(RespID responderID)
basic constructor
-
BasicOCSPRespBuilder
public BasicOCSPRespBuilder(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo key, org.bouncycastle.operator.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 detailscertStatus
- 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 detailscertStatus
- status of the certificate - null if okaysingleExtensions
- 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 detailsnextUpdate
- date when next update should be requestedcertStatus
- status of the certificate - null if okaysingleExtensions
- 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 detailsthisUpdate
- date this response was valid onnextUpdate
- date when next update should be requestedcertStatus
- 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 detailsthisUpdate
- date this response was valid onnextUpdate
- date when next update should be requestedcertStatus
- status of the certificate - null if okaysingleExtensions
- 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(org.bouncycastle.operator.ContentSigner signer, X509CertificateHolder[] chain, java.util.Date producedAt) throws OCSPException
- Throws:
OCSPException
-
-