PEMFile (Apache Tomcat 8.5.55 API Documentation)

org.apache.tomcat.util.net.jsse

## Class PEMFile

- java.lang.Object
- - org.apache.tomcat.util.net.jsse.PEMFile

-     public class PEMFile
      extends Object

  RFC 1421 PEM file containing X509 certificates or private keys (PKCS#8 only, i.e. with boundaries containing "BEGIN PRIVATE KEY" or "BEGIN ENCRYPTED PRIVATE KEY", not "BEGIN RSA PRIVATE KEY" or other variations).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PEMFile(String filename)`
    `PEMFile(String filename, String password)`
    `PEMFile(String filename, String password, String keyAlgorithm)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<X509Certificate>` | `getCertificates()`
    `PrivateKey` | `getPrivateKey()`

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

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

- - ### Constructor Detail

    - #### PEMFile

          public PEMFile(String filename)
                  throws IOException,
                         GeneralSecurityException

      Throws:
        `IOException`
        `GeneralSecurityException`

    - #### PEMFile

          public PEMFile(String filename,
                 String password)
                  throws IOException,
                         GeneralSecurityException

      Throws:
        `IOException`
        `GeneralSecurityException`

    - #### PEMFile

          public PEMFile(String filename,
                 String password,
                 String keyAlgorithm)
                  throws IOException,
                         GeneralSecurityException

      Throws:
        `IOException`
        `GeneralSecurityException`

  - ### Method Detail

    - #### getCertificates

          public List<X509Certificate> getCertificates()

    - #### getPrivateKey

          public PrivateKey getPrivateKey()

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.