Class PEMFile


  • public class PEMFile
    extends java.lang.Object
    RFC 1421 PEM file containing X509 certificates or private keys.
    • Constructor Summary

      Constructors 
      Constructor Description
      PEMFile​(java.lang.String filename)  
      PEMFile​(java.lang.String filename, java.lang.String password)  
      PEMFile​(java.lang.String filename, java.lang.String password, java.lang.String keyAlgorithm)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.security.cert.X509Certificate> getCertificates()  
      java.security.PrivateKey getPrivateKey()  
      static java.lang.String toPEM​(java.security.cert.X509Certificate certificate)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PEMFile

        public PEMFile​(java.lang.String filename)
                throws java.io.IOException,
                       java.security.GeneralSecurityException
        Throws:
        java.io.IOException
        java.security.GeneralSecurityException
      • PEMFile

        public PEMFile​(java.lang.String filename,
                       java.lang.String password)
                throws java.io.IOException,
                       java.security.GeneralSecurityException
        Throws:
        java.io.IOException
        java.security.GeneralSecurityException
      • PEMFile

        public PEMFile​(java.lang.String filename,
                       java.lang.String password,
                       java.lang.String keyAlgorithm)
                throws java.io.IOException,
                       java.security.GeneralSecurityException
        Throws:
        java.io.IOException
        java.security.GeneralSecurityException
    • Method Detail

      • toPEM

        public static java.lang.String toPEM​(java.security.cert.X509Certificate certificate)
                                      throws java.security.cert.CertificateEncodingException
        Throws:
        java.security.cert.CertificateEncodingException
      • getCertificates

        public java.util.List<java.security.cert.X509Certificate> getCertificates()
      • getPrivateKey

        public java.security.PrivateKey getPrivateKey()