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

public Class CertificateResponse

extends Object
Class Inheritance
Imports
java.util.Collection, org.bouncycastle.asn1.cmp.CMPCertificate, .CertResponse, .CertifiedKeyPair, org.bouncycastle.asn1.cms.ContentInfo, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, org.bouncycastle.cms.CMSEnvelopedData, .CMSException, .Recipient, .RecipientInformation, .RecipientInformationStore

High level wrapper for the CertResponse CRMF structure.

Field Summary

Modifier and TypeField and Description
private final CertResponse

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public CMPCertificate

Returns:

a CMPCertificate if a plaintext certificate is present.
getCertificate
(Recipient recipient)

Return the CMPCertificate representing the plaintext certificate in the response.

public CMPCertificate

Returns:

a CMPCertificate if a plaintext certificate is present.
getCertificate
()

Return the CMPCertificate representing the plaintext certificate in the response.

public CMSEnvelopedData

Returns:

a CMEEnvelopedData if an encrypted certificate is present.
getEncryptedCertificate
()

Return a CMSEnvelopedData representing the encrypted certificate contained in the response.

public boolean

Returns:

true if certificate in response encrypted, false otherwise.
hasEncryptedCertificate
()

Return true if the response contains an encrypted certificate.

public CertResponse

Returns:

a CertResponse
toASN1Structure
()

Return this object's underlying ASN.1 structure.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certResponseback to summary
private final CertResponse certResponse

Constructor Detail

CertificateResponseback to summary
public CertificateResponse(CertResponse certResponse)

Method Detail

getCertificateback to summary
public CMPCertificate getCertificate(Recipient recipient) throws CMSException

Return the CMPCertificate representing the plaintext certificate in the response.

Returns:CMPCertificate

a CMPCertificate if a plaintext certificate is present.

Exceptions
IllegalStateException:
if no plaintext certificate is present.
getCertificateback to summary
public CMPCertificate getCertificate() throws CMSException

Return the CMPCertificate representing the plaintext certificate in the response.

Returns:CMPCertificate

a CMPCertificate if a plaintext certificate is present.

Exceptions
IllegalStateException:
if no plaintext certificate is present.
getEncryptedCertificateback to summary
public CMSEnvelopedData getEncryptedCertificate() throws CMSException

Return a CMSEnvelopedData representing the encrypted certificate contained in the response.

Returns:CMSEnvelopedData

a CMEEnvelopedData if an encrypted certificate is present.

Exceptions
IllegalStateException:
if no encrypted certificate is present, or there is an issue with the enveloped data.
hasEncryptedCertificateback to summary
public boolean hasEncryptedCertificate()

Return true if the response contains an encrypted certificate.

Returns:boolean

true if certificate in response encrypted, false otherwise.

toASN1Structureback to summary
public CertResponse toASN1Structure()

Return this object's underlying ASN.1 structure.

Returns:CertResponse

a CertResponse