Package org.bouncycastle.cert.crmf
Class CertificateResponseBuilder
- java.lang.Object
-
- org.bouncycastle.cert.crmf.CertificateResponseBuilder
-
public class CertificateResponseBuilder extends java.lang.Object
Builder for CertificateResponse objects (the CertResponse CRMF equivalent).
-
-
Constructor Summary
Constructors Constructor Description CertificateResponseBuilder(org.bouncycastle.asn1.ASN1Integer certReqId, org.bouncycastle.asn1.cmp.PKIStatusInfo statusInfo)
Base constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CertificateResponse
build()
CertificateResponseBuilder
withCertificate(org.bouncycastle.asn1.cmp.CMPCertificate certificate)
Specify the certificate to assign to this response (in plaintext).CertificateResponseBuilder
withCertificate(X509CertificateHolder certificate)
Specify the certificate to assign to this response (in plaintext).CertificateResponseBuilder
withCertificate(CMSEnvelopedData encryptedCertificate)
Specify the encrypted certificate to assign to this response (in plaintext).CertificateResponseBuilder
withResponseInfo(byte[] responseInfo)
Specify the response info field on the response.
-
-
-
Constructor Detail
-
CertificateResponseBuilder
public CertificateResponseBuilder(org.bouncycastle.asn1.ASN1Integer certReqId, org.bouncycastle.asn1.cmp.PKIStatusInfo statusInfo)
Base constructor.- Parameters:
certReqId
- the request ID for the response.statusInfo
- the status info to associate with the response.
-
-
Method Detail
-
withCertificate
public CertificateResponseBuilder withCertificate(X509CertificateHolder certificate)
Specify the certificate to assign to this response (in plaintext).- Parameters:
certificate
- the X.509 PK certificate to include.- Returns:
- the current builder.
-
withCertificate
public CertificateResponseBuilder withCertificate(org.bouncycastle.asn1.cmp.CMPCertificate certificate)
Specify the certificate to assign to this response (in plaintext).- Parameters:
certificate
- the X.509 PK certificate to include.- Returns:
- the current builder.
-
withCertificate
public CertificateResponseBuilder withCertificate(CMSEnvelopedData encryptedCertificate)
Specify the encrypted certificate to assign to this response (in plaintext).- Parameters:
encryptedCertificate
- an encrypted- Returns:
- the current builder.
-
withResponseInfo
public CertificateResponseBuilder withResponseInfo(byte[] responseInfo)
Specify the response info field on the response.- Parameters:
responseInfo
- a response info string.- Returns:
- the current builder.
-
build
public CertificateResponse build()
-
-