CertificateFactory (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.jcajce.provider.asymmetric.x509

## Class CertificateFactory

- java.lang.Object
- - java.security.cert.CertificateFactorySpi
  - - org.bouncycastle.jcajce.provider.asymmetric.x509.CertificateFactory

-     public class CertificateFactory
      extends java.security.cert.CertificateFactorySpi

  class for dealing with X509 certificates.

  At the moment this will deal with "-----BEGIN CERTIFICATE-----" to "-----END CERTIFICATE-----" base 64 encoded certs, as well as the BER binaries of certificates and some classes of PKCS#7 objects.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CertificateFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.security.cert.CRL` | `createCRL(CertificateList c)`
    `java.security.cert.Certificate` | `engineGenerateCertificate(java.io.InputStream in)` Generates a certificate object and initializes it with the data read from the input stream inStream.
    `java.util.Collection` | `engineGenerateCertificates(java.io.InputStream inStream)` Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
    `java.security.cert.CertPath` | `engineGenerateCertPath(java.io.InputStream inStream)`
    `java.security.cert.CertPath` | `engineGenerateCertPath(java.io.InputStream inStream, java.lang.String encoding)`
    `java.security.cert.CertPath` | `engineGenerateCertPath(java.util.List certificates)`
    `java.security.cert.CRL` | `engineGenerateCRL(java.io.InputStream inStream)` Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.
    `java.util.Collection` | `engineGenerateCRLs(java.io.InputStream inStream)` Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream.
    `java.util.Iterator` | `engineGetCertPathEncodings()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CertificateFactory

          public CertificateFactory()

  - ### Method Detail

    - #### createCRL

          protected java.security.cert.CRL createCRL(CertificateList c)
                                              throws java.security.cert.CRLException

      Throws:
        `java.security.cert.CRLException`

    - #### engineGenerateCertificate

          public java.security.cert.Certificate engineGenerateCertificate(java.io.InputStream in)
                                                                   throws java.security.cert.CertificateException

      Generates a certificate object and initializes it with the data read from the input stream inStream.
      Specified by:
        `engineGenerateCertificate` in class `java.security.cert.CertificateFactorySpi`
      Throws:
        `java.security.cert.CertificateException`

    - #### engineGenerateCertificates

          public java.util.Collection engineGenerateCertificates(java.io.InputStream inStream)
                                                          throws java.security.cert.CertificateException

      Returns a (possibly empty) collection view of the certificates read from the given input stream inStream.
      Specified by:
        `engineGenerateCertificates` in class `java.security.cert.CertificateFactorySpi`
      Throws:
        `java.security.cert.CertificateException`

    - #### engineGenerateCRL

          public java.security.cert.CRL engineGenerateCRL(java.io.InputStream inStream)
                                                   throws java.security.cert.CRLException

      Generates a certificate revocation list (CRL) object and initializes it with the data read from the input stream inStream.
      Specified by:
        `engineGenerateCRL` in class `java.security.cert.CertificateFactorySpi`
      Throws:
        `java.security.cert.CRLException`

    - #### engineGenerateCRLs

          public java.util.Collection engineGenerateCRLs(java.io.InputStream inStream)
                                                  throws java.security.cert.CRLException

      Returns a (possibly empty) collection view of the CRLs read from the given input stream inStream. The inStream may contain a sequence of DER-encoded CRLs, or a PKCS#7 CRL set. This is a PKCS#7 SignedData object, with the only signficant field being crls. In particular the signature and the contents are ignored.
      Specified by:
        `engineGenerateCRLs` in class `java.security.cert.CertificateFactorySpi`
      Throws:
        `java.security.cert.CRLException`

    - #### engineGetCertPathEncodings

          public java.util.Iterator engineGetCertPathEncodings()

      Overrides:
        `engineGetCertPathEncodings` in class `java.security.cert.CertificateFactorySpi`

    - #### engineGenerateCertPath

          public java.security.cert.CertPath engineGenerateCertPath(java.io.InputStream inStream)
                                                             throws java.security.cert.CertificateException

      Overrides:
        `engineGenerateCertPath` in class `java.security.cert.CertificateFactorySpi`
      Throws:
        `java.security.cert.CertificateException`

    - #### engineGenerateCertPath

          public java.security.cert.CertPath engineGenerateCertPath(java.io.InputStream inStream,
                                                           java.lang.String encoding)
                                                             throws java.security.cert.CertificateException

      Overrides:
        `engineGenerateCertPath` in class `java.security.cert.CertificateFactorySpi`
      Throws:
        `java.security.cert.CertificateException`

    - #### engineGenerateCertPath

          public java.security.cert.CertPath engineGenerateCertPath(java.util.List certificates)
                                                             throws java.security.cert.CertificateException

      Overrides:
        `engineGenerateCertPath` in class `java.security.cert.CertificateFactorySpi`
      Throws:
        `java.security.cert.CertificateException`