Package org.bouncycastle.cert.crmf
Class CertificateResponse
- java.lang.Object
-
- org.bouncycastle.cert.crmf.CertificateResponse
-
public class CertificateResponse extends java.lang.Object
High level wrapper for the CertResponse CRMF structure.
-
-
Constructor Summary
Constructors Constructor Description CertificateResponse(org.bouncycastle.asn1.cmp.CertResponse certResponse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.asn1.cmp.CMPCertificate
getCertificate()
Return the CMPCertificate representing the plaintext certificate in the response.org.bouncycastle.asn1.cmp.CMPCertificate
getCertificate(Recipient recipient)
Return the CMPCertificate representing the plaintext certificate in the response.CMSEnvelopedData
getEncryptedCertificate()
Return a CMSEnvelopedData representing the encrypted certificate contained in the response.boolean
hasEncryptedCertificate()
Return true if the response contains an encrypted certificate.org.bouncycastle.asn1.cmp.CertResponse
toASN1Structure()
Return this object's underlying ASN.1 structure.
-
-
-
Method Detail
-
hasEncryptedCertificate
public boolean hasEncryptedCertificate()
Return true if the response contains an encrypted certificate.- Returns:
- true if certificate in response encrypted, false otherwise.
-
getEncryptedCertificate
public CMSEnvelopedData getEncryptedCertificate() throws CMSException
Return a CMSEnvelopedData representing the encrypted certificate contained in the response.- Returns:
- a CMEEnvelopedData if an encrypted certificate is present.
- Throws:
java.lang.IllegalStateException
- if no encrypted certificate is present, or there is an issue with the enveloped data.CMSException
-
getCertificate
public org.bouncycastle.asn1.cmp.CMPCertificate getCertificate(Recipient recipient) throws CMSException
Return the CMPCertificate representing the plaintext certificate in the response.- Returns:
- a CMPCertificate if a plaintext certificate is present.
- Throws:
java.lang.IllegalStateException
- if no plaintext certificate is present.CMSException
-
getCertificate
public org.bouncycastle.asn1.cmp.CMPCertificate getCertificate() throws CMSException
Return the CMPCertificate representing the plaintext certificate in the response.- Returns:
- a CMPCertificate if a plaintext certificate is present.
- Throws:
java.lang.IllegalStateException
- if no plaintext certificate is present.CMSException
-
toASN1Structure
public org.bouncycastle.asn1.cmp.CertResponse toASN1Structure()
Return this object's underlying ASN.1 structure.- Returns:
- a CertResponse
-
-