Package org.ldaptive.ssl
Class PrivateKeyCredentialReader
- All Implemented Interfaces:
CredentialReader<PrivateKey>
Reads private key credentials from classpath, filepath, or stream resource. Supported private key formats include:
PKCS8.
-
Field Summary
Fields inherited from class org.ldaptive.ssl.AbstractCredentialReader
logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread
(InputStream is, String... params) Reads a private key from an input stream.Methods inherited from class org.ldaptive.ssl.AbstractCredentialReader
getBufferedInputStream, read
-
Constructor Details
-
PrivateKeyCredentialReader
public PrivateKeyCredentialReader()
-
-
Method Details
-
read
public PrivateKey read(InputStream is, String... params) throws IOException, GeneralSecurityException Reads a private key from an input stream.- Parameters:
is
- Input stream from which to read private key.params
- A single optional parameter, algorithm, may be specified. The default is RSA.- Returns:
- Private key read from data in stream.
- Throws:
IOException
- On IO errors.GeneralSecurityException
- On errors with the credential data.
-