org.apache.qpid.ssl
Class SSLContextFactory

java.lang.Object
  extended by org.apache.qpid.ssl.SSLContextFactory

public class SSLContextFactory
extends Object

Factory used to create SSLContexts. SSL needs to be configured before this will work.


Constructor Summary
SSLContextFactory(String trustStorePath, String trustStorePassword, String trustStoreCertType)
           
SSLContextFactory(String trustStorePath, String trustStorePassword, String trustStoreCertType, KeyManager customKeyManager)
           
SSLContextFactory(String trustStorePath, String trustStorePassword, String trustStoreCertType, String keyStorePath, String keyStorePassword, String keyStoreCertType)
          Create a factory instance
 
Method Summary
 SSLContext buildClientContext()
          Creates a SSLContext factory appropriate for use with a client
 SSLContext buildServerContext()
          Builds a SSLContext appropriate for use with a server
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLContextFactory

public SSLContextFactory(String trustStorePath,
                         String trustStorePassword,
                         String trustStoreCertType)

SSLContextFactory

public SSLContextFactory(String trustStorePath,
                         String trustStorePassword,
                         String trustStoreCertType,
                         String keyStorePath,
                         String keyStorePassword,
                         String keyStoreCertType)
Create a factory instance

Parameters:
keystorePath - path to the Java keystore file
keystorePassword - password for the Java keystore
certType - certificate type

SSLContextFactory

public SSLContextFactory(String trustStorePath,
                         String trustStorePassword,
                         String trustStoreCertType,
                         KeyManager customKeyManager)
Method Detail

buildServerContext

public SSLContext buildServerContext()
                              throws GeneralSecurityException,
                                     IOException
Builds a SSLContext appropriate for use with a server

Returns:
SSLContext
Throws:
GeneralSecurityException
IOException

buildClientContext

public SSLContext buildClientContext()
                              throws GeneralSecurityException,
                                     IOException
Creates a SSLContext factory appropriate for use with a client

Returns:
SSLContext
Throws:
GeneralSecurityException
IOException


Licensed to the Apache Software Foundation