Package org.jboss.netty.handler.ssl
Class JdkSslContext
- java.lang.Object
-
- org.jboss.netty.handler.ssl.SslContext
-
- org.jboss.netty.handler.ssl.JdkSslContext
-
- Direct Known Subclasses:
JdkSslClientContext,JdkSslServerContext
public abstract class JdkSslContext extends SslContext
AnSslContextwhich uses JDK's SSL/TLS implementation.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]cipherSuites(package private) static java.util.List<java.lang.String>DEFAULT_CIPHERSprivate static InternalLoggerlogger(package private) static java.lang.StringPROTOCOL(package private) static java.lang.String[]PROTOCOLSprivate java.util.List<java.lang.String>unmodifiableCipherSuites
-
Constructor Summary
Constructors Constructor Description JdkSslContext(SslBufferPool bufferPool, java.lang.Iterable<java.lang.String> ciphers)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private static voidaddIfSupported(java.lang.String[] supported, java.util.List<java.lang.String> enabled, java.lang.String... names)java.util.List<java.lang.String>cipherSuites()Returns the list of enabled cipher suites, in the order of preference.abstract javax.net.ssl.SSLContextcontext()Returns the JDKSSLContextobject held by this context.javax.net.ssl.SSLEnginenewEngine()Creates a newSSLEngine.javax.net.ssl.SSLEnginenewEngine(java.lang.String peerHost, int peerPort)Creates a newSSLEngineusing advisory peer information.longsessionCacheSize()Returns the size of the cache used for storing SSL session objects.javax.net.ssl.SSLSessionContextsessionContext()Returns the JDKSSLSessionContextobject held by this context.longsessionTimeout()Returns the timeout for the cached SSL session objects, in seconds.private static java.lang.String[]toCipherSuiteArray(java.lang.Iterable<java.lang.String> ciphers)private javax.net.ssl.SSLEnginewrapEngine(javax.net.ssl.SSLEngine engine)-
Methods inherited from class org.jboss.netty.handler.ssl.SslContext
bufferPool, defaultClientProvider, defaultServerProvider, isClient, isServer, newBufferPool, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newHandler, newHandler, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, nextProtocols
-
-
-
-
Field Detail
-
logger
private static final InternalLogger logger
-
PROTOCOL
static final java.lang.String PROTOCOL
- See Also:
- Constant Field Values
-
PROTOCOLS
static final java.lang.String[] PROTOCOLS
-
DEFAULT_CIPHERS
static final java.util.List<java.lang.String> DEFAULT_CIPHERS
-
cipherSuites
private final java.lang.String[] cipherSuites
-
unmodifiableCipherSuites
private final java.util.List<java.lang.String> unmodifiableCipherSuites
-
-
Constructor Detail
-
JdkSslContext
JdkSslContext(SslBufferPool bufferPool, java.lang.Iterable<java.lang.String> ciphers)
-
-
Method Detail
-
addIfSupported
private static void addIfSupported(java.lang.String[] supported, java.util.List<java.lang.String> enabled, java.lang.String... names)
-
context
public abstract javax.net.ssl.SSLContext context()
Returns the JDKSSLContextobject held by this context.
-
sessionContext
public final javax.net.ssl.SSLSessionContext sessionContext()
Returns the JDKSSLSessionContextobject held by this context.
-
cipherSuites
public final java.util.List<java.lang.String> cipherSuites()
Description copied from class:SslContextReturns the list of enabled cipher suites, in the order of preference.- Specified by:
cipherSuitesin classSslContext
-
sessionCacheSize
public final long sessionCacheSize()
Description copied from class:SslContextReturns the size of the cache used for storing SSL session objects.- Specified by:
sessionCacheSizein classSslContext
-
sessionTimeout
public final long sessionTimeout()
Description copied from class:SslContextReturns the timeout for the cached SSL session objects, in seconds.- Specified by:
sessionTimeoutin classSslContext
-
newEngine
public final javax.net.ssl.SSLEngine newEngine()
Description copied from class:SslContextCreates a newSSLEngine.- Specified by:
newEnginein classSslContext- Returns:
- a new
SSLEngine
-
newEngine
public final javax.net.ssl.SSLEngine newEngine(java.lang.String peerHost, int peerPort)Description copied from class:SslContextCreates a newSSLEngineusing advisory peer information.- Specified by:
newEnginein classSslContext- Parameters:
peerHost- the non-authoritative name of the hostpeerPort- the non-authoritative port- Returns:
- a new
SSLEngine
-
wrapEngine
private javax.net.ssl.SSLEngine wrapEngine(javax.net.ssl.SSLEngine engine)
-
toCipherSuiteArray
private static java.lang.String[] toCipherSuiteArray(java.lang.Iterable<java.lang.String> ciphers)
-
-