|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.connection.tls.CertificateLoader
public class CertificateLoader
Provides static methods to load keys, certificates and CRLs from file formats supported by Genesys Framework.
Constructor Summary | |
---|---|
CertificateLoader()
|
Method Summary | |
---|---|
static java.security.PrivateKey |
createKeyFromPKCS8Bytes(byte[] encodedKey)
Converts encoded key data to PrivetKey instance. |
static java.security.PrivateKey |
createKeyFromX509Bytes(byte[] encodedKey)
Converts encoded key data to PrivetKey instance. |
static java.security.cert.Certificate |
loadCertificateFromX509PEM(java.io.InputStream inputStream)
Loads single certificate in X.509 PEM format from InputStream. |
static java.security.cert.Certificate |
loadCertificateFromX509PEM(java.lang.String path)
Loads single certificate in X.509 PEM format from InputStream. |
static java.security.cert.Certificate[] |
loadCertificatesFromX509PEM(java.io.InputStream inputStream)
Loads chain of certificates in X.509 PEM format from InputStream. |
static java.security.cert.Certificate[] |
loadCertificatesFromX509PEM(java.lang.String path)
Loads chain of certificates in X.509 PEM format from file. |
static java.util.Collection<? extends java.security.cert.CRL> |
loadCRLFromPEM(java.io.InputStream inputStream)
Loads CRLs from InputStream |
static java.util.Collection<? extends java.security.cert.CRL> |
loadCRLFromPEM(java.lang.String path)
Loads CRLs from file |
static java.security.PrivateKey |
loadKeyFromPEM(java.io.InputStream inputStream)
Loads single private key in PKCS#8 OR X.509 PEM format from InputStream. |
static java.security.PrivateKey |
loadKeyFromPEM(java.lang.String path)
Loads single private key in PKCS#8 or X.509 PEM format from file. |
static java.security.PrivateKey |
loadKeyFromPKCS8DER(java.io.InputStream inputStream)
Loads single private key in PKCS#8 DER format from InputStream. |
static java.security.PrivateKey |
loadKeyFromPKCS8DER(java.lang.String path)
Loads single private key in PKCS#8 DER format from file. |
static java.security.PrivateKey |
loadKeyFromPKCS8PEM(java.io.InputStream inputStream)
Loads single private key in PKCS#8 PEM format from InputStream. |
static java.security.PrivateKey |
loadKeyFromPKCS8PEM(java.lang.String path)
Loads single private key in PKCS#8 PEM format from file. |
static java.security.PrivateKey |
loadKeyFromX509DER(java.io.InputStream inputStream)
Loads single private key in X.509 DER format from InputStream. |
static java.security.PrivateKey |
loadKeyFromX509DER(java.lang.String path)
Loads single private key in X.509 DER format from file. |
static java.security.PrivateKey |
loadKeyFromX509PEM(java.io.InputStream inputStream)
Loads single private key in X.509 PEM format from InputStream. |
static java.security.PrivateKey |
loadKeyFromX509PEM(java.lang.String path)
Loads single private key in X.509 PEM format from file. |
static byte[] |
readFully(java.io.InputStream inputStream)
Utilty method that loads whole stream contents to byte array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CertificateLoader()
Method Detail |
---|
public static java.security.cert.Certificate[] loadCertificatesFromX509PEM(java.io.InputStream inputStream) throws java.security.GeneralSecurityException, java.io.IOException
inputStream
- Stream to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.cert.Certificate[] loadCertificatesFromX509PEM(java.lang.String path) throws java.security.GeneralSecurityException, java.io.IOException
path
- Path to file to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.cert.Certificate loadCertificateFromX509PEM(java.io.InputStream inputStream) throws java.security.GeneralSecurityException, java.io.IOException
inputStream
- Stream to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.cert.Certificate loadCertificateFromX509PEM(java.lang.String path) throws java.security.GeneralSecurityException, java.io.IOException
path
- Path to file to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey loadKeyFromX509PEM(java.io.InputStream inputStream) throws java.security.GeneralSecurityException, java.io.IOException
inputStream
- Path to file to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey loadKeyFromPKCS8PEM(java.io.InputStream inputStream) throws java.security.GeneralSecurityException, java.io.IOException
inputStream
- Path to file to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey loadKeyFromPEM(java.io.InputStream inputStream) throws java.security.GeneralSecurityException, java.io.IOException
inputStream
- Path to file to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey loadKeyFromPEM(java.lang.String path) throws java.security.GeneralSecurityException, java.io.IOException
path
- Path to file to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey loadKeyFromX509PEM(java.lang.String path) throws java.security.GeneralSecurityException, java.io.IOException
path
- Path to file to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey loadKeyFromPKCS8PEM(java.lang.String path) throws java.security.GeneralSecurityException, java.io.IOException
path
- Path to file to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey loadKeyFromX509DER(java.io.InputStream inputStream) throws java.security.GeneralSecurityException, java.io.IOException
inputStream
- Stream to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey loadKeyFromX509DER(java.lang.String path) throws java.security.GeneralSecurityException, java.io.IOException
path
- Path to file to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey loadKeyFromPKCS8DER(java.io.InputStream inputStream) throws java.security.GeneralSecurityException, java.io.IOException
inputStream
- Stream to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey loadKeyFromPKCS8DER(java.lang.String path) throws java.security.GeneralSecurityException, java.io.IOException
path
- Path to file to load from
java.security.GeneralSecurityException
- If there are problems with stream format and/or data
java.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey createKeyFromPKCS8Bytes(byte[] encodedKey) throws java.security.GeneralSecurityException
encodedKey
- Raw private key data
java.security.GeneralSecurityException
- If there are problems with data formatpublic static java.security.PrivateKey createKeyFromX509Bytes(byte[] encodedKey) throws java.security.GeneralSecurityException
encodedKey
- Raw private key data
java.security.GeneralSecurityException
- If there are problems with data formatpublic static java.util.Collection<? extends java.security.cert.CRL> loadCRLFromPEM(java.io.InputStream inputStream) throws java.security.GeneralSecurityException, java.io.IOException
inputStream
- Stream to load from
java.security.GeneralSecurityException
- If there are problems with format and/or data
java.io.IOException
- If there are problems reading streampublic static java.util.Collection<? extends java.security.cert.CRL> loadCRLFromPEM(java.lang.String path) throws java.security.GeneralSecurityException, java.io.IOException
path
- Path to file to load from
java.security.GeneralSecurityException
- If there are problems with format and/or data
java.io.IOException
- If there are problems reading streampublic static byte[] readFully(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- Stream to load from
java.io.IOException
- If there are problems reading stream
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |