Package org.bouncycastle.cert.crmf
Class CertificateResponse
java.lang.Object
org.bouncycastle.cert.crmf.CertificateResponse
High level wrapper for the CertResponse CRMF structure.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.cmp.CMPCertificate
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.Return a CMSEnvelopedData representing the encrypted certificate contained in the response.boolean
Return true if the response contains an encrypted certificate.org.bouncycastle.asn1.cmp.CertResponse
Return this object's underlying ASN.1 structure.
-
Constructor Details
-
CertificateResponse
public CertificateResponse(org.bouncycastle.asn1.cmp.CertResponse certResponse)
-
-
Method Details
-
hasEncryptedCertificate
public boolean hasEncryptedCertificate()Return true if the response contains an encrypted certificate.- Returns:
- true if certificate in response encrypted, false otherwise.
-
getEncryptedCertificate
Return a CMSEnvelopedData representing the encrypted certificate contained in the response.- Returns:
- a CMEEnvelopedData if an encrypted certificate is present.
- Throws:
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:
IllegalStateException
- if no plaintext certificate is present.CMSException
-
getCertificate
Return the CMPCertificate representing the plaintext certificate in the response.- Returns:
- a CMPCertificate if a plaintext certificate is present.
- Throws:
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
-