Package edu.vt.middleware.ldap.ssl
Class PrivateKeyCredentialReader
- java.lang.Object
-
- edu.vt.middleware.ldap.ssl.AbstractCredentialReader<java.security.PrivateKey>
-
- edu.vt.middleware.ldap.ssl.PrivateKeyCredentialReader
-
- All Implemented Interfaces:
CredentialReader<java.security.PrivateKey>
public class PrivateKeyCredentialReader extends AbstractCredentialReader<java.security.PrivateKey>
Reads private key credentials from classpath, filepath, or stream resource. Supported private key formats include: PKCS8.- Version:
- $Revision$
- Author:
- Middleware Services
-
-
Field Summary
-
Fields inherited from class edu.vt.middleware.ldap.ssl.AbstractCredentialReader
CLASSPATH_PREFIX, FILE_PREFIX, logger
-
-
Constructor Summary
Constructors Constructor Description PrivateKeyCredentialReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.PrivateKey
read(java.io.InputStream is, java.lang.String... params)
Reads a private key from an input stream.-
Methods inherited from class edu.vt.middleware.ldap.ssl.AbstractCredentialReader
getBufferedInputStream, read
-
-
-
-
Method Detail
-
read
public java.security.PrivateKey read(java.io.InputStream is, java.lang.String... params) throws java.io.IOException, java.security.GeneralSecurityException
Reads a private key from an input stream.- Specified by:
read
in interfaceCredentialReader<java.security.PrivateKey>
- Specified by:
read
in classAbstractCredentialReader<java.security.PrivateKey>
- 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:
java.io.IOException
- On IO errors.java.security.GeneralSecurityException
- On errors with the credential data.
-
-