Package 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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<X509Certificate>
getCertificates()
PrivateKey
getPrivateKey()
static String
toPEM(X509Certificate certificate)
-
-
-
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
-
toPEM
public static String toPEM(X509Certificate certificate) throws CertificateEncodingException
- Throws:
CertificateEncodingException
-
getCertificates
public List<X509Certificate> getCertificates()
-
getPrivateKey
public PrivateKey getPrivateKey()
-
-