Package org.apache.tomcat.util.net.jsse
Class PEMFile
- java.lang.Object
-
- org.apache.tomcat.util.net.jsse.PEMFile
-
public class PEMFile extends java.lang.Object
RFC 1421 PEM file containing X509 certificates or private keys.
-
-
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)
-
-
-
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()
-
-