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.
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CertificateResponse
public CertificateResponse(org.bouncycastle.asn1.cmp.CertResponse certResponse)
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.
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.
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.
toASN1Structure
public org.bouncycastle.asn1.cmp.CertResponse toASN1Structure()
- Return this object's underlying ASN.1 structure.
- Returns:
- a CertResponse