org.bouncycastle.ocsp

Class BasicOCSPRespGenerator

public class BasicOCSPRespGenerator extends Object

Generator for basic OCSP response objects.
Constructor Summary
BasicOCSPRespGenerator(RespID responderID)
basic constructor
BasicOCSPRespGenerator(PublicKey key)
construct with the responderID to be the SHA-1 keyHash of the passed in public key.
Method Summary
voidaddResponse(CertificateID certID, CertificateStatus certStatus)
Add a response for a particular Certificate ID.
voidaddResponse(CertificateID certID, CertificateStatus certStatus, X509Extensions singleExtensions)
Add a response for a particular Certificate ID.
voidaddResponse(CertificateID certID, CertificateStatus certStatus, Date nextUpdate, X509Extensions singleExtensions)
Add a response for a particular Certificate ID.
voidaddResponse(CertificateID certID, CertificateStatus certStatus, Date thisUpdate, Date nextUpdate, X509Extensions singleExtensions)
Add a response for a particular Certificate ID.
BasicOCSPRespgenerate(String signingAlgorithm, PrivateKey key, X509Certificate[] chain, Date thisUpdate, String provider)
BasicOCSPRespgenerate(String signingAlgorithm, PrivateKey key, X509Certificate[] chain, Date producedAt, String provider, SecureRandom random)
IteratorgetSignatureAlgNames()
Return an iterator of the signature names supported by the generator.
voidsetResponseExtensions(X509Extensions responseExtensions)
Set the extensions for the response.

Constructor Detail

BasicOCSPRespGenerator

public BasicOCSPRespGenerator(RespID responderID)
basic constructor

BasicOCSPRespGenerator

public BasicOCSPRespGenerator(PublicKey key)
construct with the responderID to be the SHA-1 keyHash of the passed in public key.

Method Detail

addResponse

public void 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 void addResponse(CertificateID certID, CertificateStatus certStatus, X509Extensions 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 void addResponse(CertificateID certID, CertificateStatus certStatus, Date nextUpdate, X509Extensions singleExtensions)
Add a response for a particular Certificate ID.

Parameters: certID certificate ID details nextUpdate date when next update should be requested certStatus status of the certificate - null if okay singleExtensions optional extensions

addResponse

public void addResponse(CertificateID certID, CertificateStatus certStatus, Date thisUpdate, Date nextUpdate, X509Extensions 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

generate

public BasicOCSPResp generate(String signingAlgorithm, PrivateKey key, X509Certificate[] chain, Date thisUpdate, String provider)

generate

public BasicOCSPResp generate(String signingAlgorithm, PrivateKey key, X509Certificate[] chain, Date producedAt, String provider, SecureRandom random)

getSignatureAlgNames

public Iterator getSignatureAlgNames()
Return an iterator of the signature names supported by the generator.

Returns: an iterator containing recognised names.

setResponseExtensions

public void setResponseExtensions(X509Extensions responseExtensions)
Set the extensions for the response.

Parameters: responseExtensions the extension object to carry.