org.ldaptive.ssl
Class KeyStoreCredentialReader

java.lang.Object
  extended by org.ldaptive.ssl.AbstractCredentialReader<KeyStore>
      extended by org.ldaptive.ssl.KeyStoreCredentialReader
All Implemented Interfaces:
CredentialReader<KeyStore>

public class KeyStoreCredentialReader
extends AbstractCredentialReader<KeyStore>

Reads keystore credentials from a classpath, filepath, or stream resource.

Version:
$Revision: 3068 $ $Date: 2014-10-24 13:22:32 -0400 (Fri, 24 Oct 2014) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.ssl.AbstractCredentialReader
logger
 
Constructor Summary
KeyStoreCredentialReader()
           
 
Method Summary
 KeyStore read(InputStream is, String... params)
          Reads a keystore 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

KeyStoreCredentialReader

public KeyStoreCredentialReader()
Method Detail

read

public KeyStore read(InputStream is,
                     String... params)
              throws IOException,
                     GeneralSecurityException
Reads a keystore from an input stream.

Parameters:
is - Input stream from which to read keystore.
params - Two optional parameters are supported:
  • keystore password
  • keystore type; defaults to JVM default keystore format if omitted

If only a single parameter is supplied, it is assumed to be the password.

Returns:
keystore read from data in stream.
Throws:
IOException - On IO errors.
GeneralSecurityException - On errors with the credential data.


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.