public class CertificateLoader
extends java.lang.Object
Constructor | Description |
---|---|
CertificateLoader() |
Modifier and Type | Method | Description |
---|---|---|
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.
|
public static java.security.cert.Certificate[] loadCertificatesFromX509PEM(java.io.InputStream inputStream) throws java.security.GeneralSecurityException, java.io.IOException
inputStream
- Stream to load fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with stream format and/or datajava.io.IOException
- If there are problems reading streampublic static java.security.PrivateKey createKeyFromPKCS8Bytes(byte[] encodedKey) throws java.security.GeneralSecurityException
encodedKey
- Raw private key datajava.security.GeneralSecurityException
- If there are problems with data formatpublic static java.security.PrivateKey createKeyFromX509Bytes(byte[] encodedKey) throws java.security.GeneralSecurityException
encodedKey
- Raw private key datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with format and/or datajava.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 fromjava.security.GeneralSecurityException
- If there are problems with format and/or datajava.io.IOException
- If there are problems reading streampublic static byte[] readFully(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- Stream to load fromjava.io.IOException
- If there are problems reading streamSend comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.