edu.vt.middleware.ldap.ssl
Class PrivateKeyCredentialReader

java.lang.Object
  extended by edu.vt.middleware.ldap.ssl.AbstractCredentialReader<PrivateKey>
      extended by 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

Field Summary
 
Fields inherited from class edu.vt.middleware.ldap.ssl.AbstractCredentialReader
CLASSPATH_PREFIX, FILE_PREFIX, logger
 
Constructor Summary
PrivateKeyCredentialReader()
           
 
Method Summary
 PrivateKey read(InputStream is, String... params)
          Reads a private key from an input stream.
 
Methods inherited from class edu.vt.middleware.ldap.ssl.AbstractCredentialReader
getBufferedInputStream, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrivateKeyCredentialReader

public PrivateKeyCredentialReader()
Method Detail

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.