Package org.ldaptive.ssl
Class PrivateKeyCredentialReader
- java.lang.Object
-
- org.ldaptive.ssl.AbstractCredentialReader<PrivateKey>
-
- org.ldaptive.ssl.PrivateKeyCredentialReader
-
- All Implemented Interfaces:
CredentialReader<PrivateKey>
public class PrivateKeyCredentialReader extends AbstractCredentialReader<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 Constructor Description PrivateKeyCredentialReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrivateKey
read(InputStream is, String... params)
Reads a private key from an input stream.-
Methods inherited from class org.ldaptive.ssl.AbstractCredentialReader
getBufferedInputStream, read
-
-
-
-
Method Detail
-
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.
-
-