public class PEMCredential extends AbstractDelegatingX509Credential
delegate| Constructor and Description |
|---|
PEMCredential(InputStream keystoreStream,
char[] keyPasswd)
Constructs the object from
InputStream which can be used to read
a private key and certificate in PEM keystore format, i.e. the file must contain
both certificates and a private key. |
PEMCredential(InputStream privateKeyStream,
InputStream certificateStream,
char[] keyPasswd)
Constructs the object from two
InputStreams which can be used to read
a private key and certificate in PEM format. |
PEMCredential(InputStream privateKeyStream,
InputStream certificateStream,
PasswordFinder pf)
As
PEMCredential(InputStream, InputStream, char[]) but password is retrieved on demand. |
PEMCredential(InputStream keystoreStream,
PasswordFinder pf)
As
PEMCredential(InputStream, char[]) but this version allows for providing
decryption key only when needed. |
PEMCredential(Reader privateKeyReader,
Reader certificateReader,
char[] keyPasswd)
Constructs the object from two
Readers which can be used to read
a private key and certificate in PEM format. |
PEMCredential(Reader privateKeyReader,
Reader certificateReader,
PasswordFinder pf)
As
PEMCredential(Reader, Reader, char[]) but password is retrieved on demand. |
PEMCredential(String keystorePath,
char[] keyPasswd)
Constructs the object from
InputStream which can be used to read
a private key and certificate in PEM keystore format, i.e. the file must contain
both certificates and a private key. |
PEMCredential(String keystorePath,
PasswordFinder pf)
As
PEMCredential(String, char[]) but this version allows for providing
decryption key only when needed. |
PEMCredential(String keyPath,
String certificatePath,
char[] keyPasswd)
Constructs the object from two files containing private key and certificate in
PEM format.
|
getCertificate, getCertificateChain, getKey, getKeyAlias, getKeyManager, getKeyPassword, getKeyStore, getSubjectNamepublic PEMCredential(String keystorePath, char[] keyPasswd) throws IOException, KeyStoreException, CertificateException
InputStream which can be used to read
a private key and certificate in PEM keystore format, i.e. the file must contain
both certificates and a private key. See
CertificateUtils.loadPEMKeystore(InputStream, char[], char[])
for details.keystorePath - file path with the PEM keystorekeyPasswd - Password used to decrypt the key. May be null if the key
is not encrypted.IOException - if the stream can not be readKeyStoreException - if private key can not be parsed or decryptedCertificateException - if certificate can not be parsedpublic PEMCredential(String keystorePath, PasswordFinder pf) throws IOException, KeyStoreException, CertificateException
PEMCredential(String, char[]) but this version allows for providing
decryption key only when needed.keystorePath - file path with the PEM keystorepf - object to retrieve password on demand.IOException - if the stream can not be readKeyStoreException - if private key can not be parsed or decryptedCertificateException - if certificate can not be parsedpublic PEMCredential(InputStream keystoreStream, char[] keyPasswd) throws IOException, KeyStoreException, CertificateException
InputStream which can be used to read
a private key and certificate in PEM keystore format, i.e. the file must contain
both certificates and a private key. See
CertificateUtils.loadPEMKeystore(InputStream, char[], char[])
for details.
The stream is closed after constructing the object.
keystoreStream - InputStream which can be used to read the PEM keystorekeyPasswd - Password used to decrypt the key. May be null if the key
is not encrypted.IOException - if the stream can not be readKeyStoreException - if private key can not be parsed or decryptedCertificateException - if certificate can not be parsedpublic PEMCredential(InputStream keystoreStream, PasswordFinder pf) throws IOException, KeyStoreException, CertificateException
PEMCredential(InputStream, char[]) but this version allows for providing
decryption key only when needed.keystoreStream - InputStream which can be used to read the PEM keystorepf - object to retrieve password on demand.IOException - if the stream can not be readKeyStoreException - if private key can not be parsed or decryptedCertificateException - if certificate can not be parsedpublic PEMCredential(InputStream privateKeyStream, InputStream certificateStream, char[] keyPasswd) throws IOException, KeyStoreException, CertificateException
InputStreams which can be used to read
a private key and certificate in PEM format.
The streams are closed after constructing the object.
privateKeyStream - InputStream which can be used to read the private key in PEM formatcertificateStream - certificate in PEM format InputStreamkeyPasswd - Password used to decrypt the key. May be null if the key
is not encrypted.IOException - if any of the streams can not be readKeyStoreException - if private key can not be parsed or decryptedCertificateException - if certificate can not be parsedpublic PEMCredential(InputStream privateKeyStream, InputStream certificateStream, PasswordFinder pf) throws IOException, KeyStoreException, CertificateException
PEMCredential(InputStream, InputStream, char[]) but password is retrieved on demand.privateKeyStream - InputStream which can be used to read the private key in PEM formatcertificateStream - certificate in PEM format InputStreampf - object to retrieve password on demand.IOException - if any of the streams can not be readKeyStoreException - if private key can not be parsed or decryptedCertificateException - if certificate can not be parsedpublic PEMCredential(Reader privateKeyReader, Reader certificateReader, char[] keyPasswd) throws IOException, KeyStoreException, CertificateException
Readers which can be used to read
a private key and certificate in PEM format.
The streams are closed after constructing the object.
privateKeyReader - Reader which can be used to read the PEM private keycertificateReader - certificate file ReaderkeyPasswd - Password used to decrypt the key. May be null if the key
is not encrypted.IOException - if any of files can not be readKeyStoreException - if private key can not be parsed or decryptedCertificateException - if certificate can not be parsedpublic PEMCredential(Reader privateKeyReader, Reader certificateReader, PasswordFinder pf) throws IOException, KeyStoreException, CertificateException
PEMCredential(Reader, Reader, char[]) but password is retrieved on demand.privateKeyReader - Reader which can be used to read the PEM private keycertificateReader - certificate file Readerpf - object to retrieve password on demand.IOException - if any of files can not be readKeyStoreException - if private key can not be parsed or decryptedCertificateException - if certificate can not be parsedpublic PEMCredential(String keyPath, String certificatePath, char[] keyPasswd) throws IOException, KeyStoreException, CertificateException
The streams are closed after constructing the object.
keyPath - private key file pathcertificatePath - certificate file pathkeyPasswd - Password used to decrypt the key. May be null if the key
is not encrypted.IOException - if any of files can not be readKeyStoreException - if private key can not be parsed or decryptedCertificateException - if certificate can not be parsedCopyright © 2012-2014 European Middleware Initiative. All Rights Reserved.