org.glite.security.trustmanager
Class ContextFactory

java.lang.Object
  extended by org.glite.security.trustmanager.ContextFactory

public class ContextFactory
extends java.lang.Object

Author:
Joni Hahkala joni.hahkala@cern.ch A factory class tha generates SSLContextWrappers and configures them.

Constructor Summary
ContextFactory()
           
 
Method Summary
static SSLContextWrapper createContextWrapper(java.util.Properties inputConfig)
          Generates a new contextfactory.
static SSLContextWrapper createContextWrapper(java.util.Properties inputConfig, org.bouncycastle.openssl.PasswordFinder finder)
          Creator method that is useful when interactive password asking is wanted.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextFactory

public ContextFactory()
Method Detail

createContextWrapper

public static SSLContextWrapper createContextWrapper(java.util.Properties inputConfig,
                                                     org.bouncycastle.openssl.PasswordFinder finder)
                                              throws java.lang.Exception
Creator method that is useful when interactive password asking is wanted.

Parameters:
inputConfig - A properties file that has all the necessary configuration values.
finder - The password finder class that is invoked whe a password is needed.
Returns:
returns the configured SSLContextWrapper class.
Throws:
java.lang.Exception - Thrown when SSLContextWrapper initialization fails.

createContextWrapper

public static SSLContextWrapper createContextWrapper(java.util.Properties inputConfig)
                                              throws java.lang.Exception
Generates a new contextfactory.

Parameters:
inputConfig - the properties to use to setup the SSLContextWrapper.
Returns:
the configured SSLContextWrapper class.
Throws:
java.lang.Exception - Thrown when SSLContextWrapper initialization fails.