Package org.bouncycastle.cert.ocsp
Class BasicOCSPRespBuilder
java.lang.Object
org.bouncycastle.cert.ocsp.BasicOCSPRespBuilder
- Direct Known Subclasses:
JcaBasicOCSPRespBuilder
Generator for basic OCSP response objects.
-
Constructor Summary
ConstructorDescriptionBasicOCSPRespBuilder
(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo key, 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
Modifier and TypeMethodDescriptionaddResponse
(CertificateID certID, CertificateStatus certStatus) Add a response for a particular Certificate ID.addResponse
(CertificateID certID, CertificateStatus certStatus, Date thisUpdate, Date nextUpdate) Add a response for a particular Certificate ID.addResponse
(CertificateID certID, CertificateStatus certStatus, Date thisUpdate, Date nextUpdate, org.bouncycastle.asn1.x509.Extensions singleExtensions) Add a response for a particular Certificate ID.addResponse
(CertificateID certID, CertificateStatus certStatus, Date nextUpdate, org.bouncycastle.asn1.x509.Extensions singleExtensions) Add a response for a particular Certificate ID.addResponse
(CertificateID certID, CertificateStatus certStatus, org.bouncycastle.asn1.x509.Extensions singleExtensions) Add a response for a particular Certificate ID.build
(ContentSigner signer, X509CertificateHolder[] chain, Date producedAt) setResponseExtensions
(org.bouncycastle.asn1.x509.Extensions responseExtensions) Set the extensions for the response.
-
Constructor Details
-
BasicOCSPRespBuilder
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
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, Date nextUpdate, 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 okaynextUpdate
- date when next update should be requestedsingleExtensions
- 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 detailscertStatus
- status of the certificate - null if okaythisUpdate
- date this response was valid onnextUpdate
- 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 detailscertStatus
- status of the certificate - null if okaythisUpdate
- date this response was valid onnextUpdate
- date when next update should be requestedsingleExtensions
- 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
-