Top Description Fields Constructors Methods
org.bouncycastle.cert.crmf

public Class CertificateResponseBuilder

extends Object
Class Inheritance
Imports
org.bouncycastle.asn1.ASN1Integer, .ASN1OctetString, .DEROctetString, org.bouncycastle.asn1.cmp.CMPCertificate, .CertOrEncCert, .CertResponse, .CertifiedKeyPair, .PKIStatusInfo, org.bouncycastle.asn1.cms.EnvelopedData, org.bouncycastle.asn1.crmf.EncryptedKey, org.bouncycastle.cert.X509CertificateHolder, org.bouncycastle.cms.CMSEnvelopedData

Builder for CertificateResponse objects (the CertResponse CRMF equivalent).

Field Summary

Modifier and TypeField and Description
private CertifiedKeyPair
private final ASN1Integer
private ASN1OctetString
private final PKIStatusInfo

Constructor Summary

AccessConstructor and Description
public
CertificateResponseBuilder(ASN1Integer
the request ID for the response.
certReqId
,
PKIStatusInfo
the status info to associate with the response.
statusInfo
)

Base constructor.

Method Summary

Modifier and TypeMethod and Description
public CertificateResponse
public CertificateResponseBuilder

Returns:

the current builder.
withCertificate
(X509CertificateHolder
the X.509 PK certificate to include.
certificate
)

Specify the certificate to assign to this response (in plaintext).

public CertificateResponseBuilder

Returns:

the current builder.
withCertificate
(CMPCertificate
the X.509 PK certificate to include.
certificate
)

Specify the certificate to assign to this response (in plaintext).

public CertificateResponseBuilder

Returns:

the current builder.
withCertificate
(CMSEnvelopedData
an encrypted
encryptedCertificate
)

Specify the encrypted certificate to assign to this response (in plaintext).

public CertificateResponseBuilder

Returns:

the current builder.
withResponseInfo
(byte[]
a response info string.
responseInfo
)

Specify the response info field on the response.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certKeyPairback to summary
private CertifiedKeyPair certKeyPair
certReqIdback to summary
private final ASN1Integer certReqId
rspInfoback to summary
private ASN1OctetString rspInfo
statusInfoback to summary
private final PKIStatusInfo statusInfo

Constructor Detail

CertificateResponseBuilderback to summary
public CertificateResponseBuilder(ASN1Integer certReqId, PKIStatusInfo statusInfo)

Base constructor.

Parameters
certReqId:ASN1Integer

the request ID for the response.

statusInfo:PKIStatusInfo

the status info to associate with the response.

Method Detail

buildback to summary
public CertificateResponse build()
withCertificateback to summary
public CertificateResponseBuilder withCertificate(X509CertificateHolder certificate)

Specify the certificate to assign to this response (in plaintext).

Parameters
certificate:X509CertificateHolder

the X.509 PK certificate to include.

Returns:CertificateResponseBuilder

the current builder.

withCertificateback to summary
public CertificateResponseBuilder withCertificate(CMPCertificate certificate)

Specify the certificate to assign to this response (in plaintext).

Parameters
certificate:CMPCertificate

the X.509 PK certificate to include.

Returns:CertificateResponseBuilder

the current builder.

withCertificateback to summary
public CertificateResponseBuilder withCertificate(CMSEnvelopedData encryptedCertificate)

Specify the encrypted certificate to assign to this response (in plaintext).

Parameters
encryptedCertificate:CMSEnvelopedData

an encrypted

Returns:CertificateResponseBuilder

the current builder.

withResponseInfoback to summary
public CertificateResponseBuilder withResponseInfo(byte[] responseInfo)

Specify the response info field on the response.

Parameters
responseInfo:byte[]

a response info string.

Returns:CertificateResponseBuilder

the current builder.