goldengate.common.crypto.ssl
Class GgSslContextFactory

java.lang.Object
  extended by goldengate.common.crypto.ssl.GgSslContextFactory

public class GgSslContextFactory
extends Object

SSL ContextFactory for Netty.

Author:
Frederic Bregier

Constructor Summary
GgSslContextFactory(GgSecureKeyStore ggSecureKeyStore)
          Create both CONTEXT
GgSslContextFactory(GgSecureKeyStore ggSecureKeyStore, boolean serverMode)
          Create only one of the CONTEXT
 
Method Summary
 SSLContext getClientContext()
           
 SSLContext getServerContext()
           
 org.jboss.netty.handler.ssl.SslHandler initPipelineFactory(boolean serverMode, boolean needClientAuth, boolean renegotiationEnable, ExecutorService executorService)
          To be called before adding as first entry in the PipelineFactory as
pipeline.addLast("ssl", sslhandler);
 boolean needClientAuthentication()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GgSslContextFactory

public GgSslContextFactory(GgSecureKeyStore ggSecureKeyStore)
Create both CONTEXT

Parameters:
ggSecureKeyStore -

GgSslContextFactory

public GgSslContextFactory(GgSecureKeyStore ggSecureKeyStore,
                           boolean serverMode)
Create only one of the CONTEXT

Parameters:
ggSecureKeyStore -
serverMode -
Method Detail

getServerContext

public SSLContext getServerContext()
Returns:
the Server Context

getClientContext

public SSLContext getClientContext()
Returns:
the Client Context

initPipelineFactory

public org.jboss.netty.handler.ssl.SslHandler initPipelineFactory(boolean serverMode,
                                                                  boolean needClientAuth,
                                                                  boolean renegotiationEnable,
                                                                  ExecutorService executorService)
To be called before adding as first entry in the PipelineFactory as
pipeline.addLast("ssl", sslhandler);

Parameters:
serverMode - True if in Server Mode, else False in Client mode
needClientAuth - True if the client needs to be authenticated (only if serverMode is True)
renegotiationEnable - True if you want to enable renegotiation (security issue CVE-2009-3555)
executorService - if not Null, gives a specific executorService
Returns:
the sslhandler

needClientAuthentication

public boolean needClientAuthentication()
Returns:
True if the associated KeyStore has a TrustStore


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.