public class CertTool extends Object
| Constructor and Description |
|---|
CertTool() |
| Modifier and Type | Method and Description |
|---|---|
static X509Certificate |
getCertfromPEM(byte[] pemBytes)
Reads a certificate in PEM-format from a byte array.
|
static X509Certificate |
getCertfromPEM(InputStream certStream)
Reads a certificate in PEM-format from an InputStream.
|
static X509Certificate |
getCertfromPEM(String certFile)
Reads a certificate in PEM-format from a file.
|
static void |
main(String[] args) |
public static X509Certificate getCertfromPEM(String certFile) throws IOException, CertificateException, NoSuchProviderException
certFile - the file containing the certificate in PEM-formatIOException - if the filen cannot be read.CertificateException - if the filen does not contain a correct certificate.NoSuchProviderException - NoSuchProviderExceptionpublic static X509Certificate getCertfromPEM(byte[] pemBytes) throws IOException, CertificateException, NoSuchProviderException
pemBytes - the byte array containing the certificate in PEM-formatIOException - if the array cannot be read.CertificateException - if the array does not contain a correct certificate.NoSuchProviderException - NoSuchProviderExceptionpublic static X509Certificate getCertfromPEM(InputStream certStream) throws IOException, CertificateException, NoSuchProviderException
certStream - the input stream containing the certificate in PEM-formatIOException - if the stream cannot be read.CertificateException - if the stream does not contain a correct certificate.NoSuchProviderException - NoSuchProviderExceptionpublic static void main(String[] args)
args - main argsCopyright © 2018. All rights reserved.