de.fhhannover.inform.trust.ifmapj
Class IfmapJHelper

java.lang.Object
  extended by de.fhhannover.inform.trust.ifmapj.IfmapJHelper

public abstract class IfmapJHelper
extends Object

To create a SSRC one needs to have KeyManager and TrustManager instances. This is a helper class to make it easy to get those.

Author:
aw

Constructor Summary
IfmapJHelper()
           
 
Method Summary
static KeyManager[] getKeyManagers()
          Creates KeyManager instances based on the javax.net.ssl.keyStore and javax.net.ssl.keyStorePassword environment variables.
static KeyManager[] getKeyManagers(InputStream keyStoreIs, String pass)
          Creates KeyManager instances based on the given parameters.
static KeyManager[] getKeyManagers(String keyStoreFile, String pass)
          Creates KeyManager instances based on the given parameters.
static TrustManager[] getTrustManagers()
          Creates TrustManager instances based on the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword environment variables.
static TrustManager[] getTrustManagers(InputStream trustStoreIs, String pass)
          Creates TrustManager instances based on the given parameters.
static TrustManager[] getTrustManagers(String trustStorePath, String pass)
          Creates TrustManager instances based on the given parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfmapJHelper

public IfmapJHelper()
Method Detail

getKeyManagers

public static KeyManager[] getKeyManagers()
                                   throws InitializationException
Creates KeyManager instances based on the javax.net.ssl.keyStore and javax.net.ssl.keyStorePassword environment variables.

Returns:
an array of KeyManager instances.
Throws:
InitializationException

getKeyManagers

public static KeyManager[] getKeyManagers(String keyStoreFile,
                                          String pass)
                                   throws InitializationException
Creates KeyManager instances based on the given parameters.

Parameters:
keyStoreFile - path to keyStore file
pass - password for keyStore
Returns:
an array of KeyManager instances
Throws:
InitializationException

getKeyManagers

public static KeyManager[] getKeyManagers(InputStream keyStoreIs,
                                          String pass)
                                   throws InitializationException
Creates KeyManager instances based on the given parameters.

Parameters:
keyStoreIs - InputStream representing contents of a keyStore
pass - password for the keyStore
Returns:
an array of KeyManager instances
Throws:
InitializationException

getTrustManagers

public static TrustManager[] getTrustManagers()
                                       throws InitializationException
Creates TrustManager instances based on the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword environment variables.

Returns:
an array of TrustManager instances
Throws:
InitializationException

getTrustManagers

public static TrustManager[] getTrustManagers(String trustStorePath,
                                              String pass)
                                       throws InitializationException
Creates TrustManager instances based on the given parameters.

Parameters:
trustStorePath - path to trustStore
pass - password for trustStore
Returns:
an array of TrustManager instances
Throws:
InitializationException

getTrustManagers

public static TrustManager[] getTrustManagers(InputStream trustStoreIs,
                                              String pass)
                                       throws InitializationException
Creates TrustManager instances based on the given parameters.

Parameters:
trustStoreIs - InputStream representing contents of a trustStore
pass - password for the trustStore
Returns:
an array of TrustManager instances
Throws:
InitializationException


Copyright © 2012 Trust@FHH. All Rights Reserved.