org.ldaptive.ssl
Class PrivateKeyCredentialReader

java.lang.Object
  extended by org.ldaptive.ssl.AbstractCredentialReader<PrivateKey>
      extended by 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.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.ssl.AbstractCredentialReader
logger
 
Constructor Summary
PrivateKeyCredentialReader()
           
 
Method Summary
 PrivateKey read(InputStream is, String... params)
          Reads a private key from an input stream.
 
Methods inherited from class org.ldaptive.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.

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-2015 Virginia Tech. All Rights Reserved.