Class CertificateResponse

java.lang.Object
org.bouncycastle.cert.crmf.CertificateResponse

public class CertificateResponse extends Object
High level wrapper for the CertResponse CRMF 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

      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:
      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

      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:
      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