edu.vt.middleware.ldap.ssl
Class PrivateKeyCredentialReader
java.lang.Object
edu.vt.middleware.ldap.ssl.AbstractCredentialReader<PrivateKey>
edu.vt.middleware.ldap.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.
- Version:
- $Revision$
- Author:
- Middleware Services
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrivateKeyCredentialReader
public PrivateKeyCredentialReader()
read
public PrivateKey read(InputStream is,
String... params)
throws IOException,
GeneralSecurityException
- Reads a private key from an input stream.
- Specified by:
read in interface CredentialReader<PrivateKey>- Specified by:
read in class AbstractCredentialReader<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:
IOException - On IO errors.
GeneralSecurityException - On errors with the credential data.
Copyright © 2003-2010 Virginia Tech. All Rights Reserved.