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
AnSslContext
which 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_CIPHERS
private static InternalLogger
logger
(package private) static java.lang.String
PROTOCOL
(package private) static java.lang.String[]
PROTOCOLS
private 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 void
addIfSupported(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.SSLContext
context()
Returns the JDKSSLContext
object held by this context.javax.net.ssl.SSLEngine
newEngine()
Creates a newSSLEngine
.javax.net.ssl.SSLEngine
newEngine(java.lang.String peerHost, int peerPort)
Creates a newSSLEngine
using advisory peer information.long
sessionCacheSize()
Returns the size of the cache used for storing SSL session objects.javax.net.ssl.SSLSessionContext
sessionContext()
Returns the JDKSSLSessionContext
object held by this context.long
sessionTimeout()
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.SSLEngine
wrapEngine(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 JDKSSLContext
object held by this context.
-
sessionContext
public final javax.net.ssl.SSLSessionContext sessionContext()
Returns the JDKSSLSessionContext
object held by this context.
-
cipherSuites
public final java.util.List<java.lang.String> cipherSuites()
Description copied from class:SslContext
Returns the list of enabled cipher suites, in the order of preference.- Specified by:
cipherSuites
in classSslContext
-
sessionCacheSize
public final long sessionCacheSize()
Description copied from class:SslContext
Returns the size of the cache used for storing SSL session objects.- Specified by:
sessionCacheSize
in classSslContext
-
sessionTimeout
public final long sessionTimeout()
Description copied from class:SslContext
Returns the timeout for the cached SSL session objects, in seconds.- Specified by:
sessionTimeout
in classSslContext
-
newEngine
public final javax.net.ssl.SSLEngine newEngine()
Description copied from class:SslContext
Creates a newSSLEngine
.- Specified by:
newEngine
in classSslContext
- Returns:
- a new
SSLEngine
-
newEngine
public final javax.net.ssl.SSLEngine newEngine(java.lang.String peerHost, int peerPort)
Description copied from class:SslContext
Creates a newSSLEngine
using advisory peer information.- Specified by:
newEngine
in 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)
-
-