Package io.netty.handler.ssl
Class DelegatingSslContext
java.lang.Object
io.netty.handler.ssl.SslContext
io.netty.handler.ssl.DelegatingSslContext
Adapter class which allows to wrap another
SslContext
and init SSLEngine
instances.-
Field Summary
FieldsFields inherited from class io.netty.handler.ssl.SslContext
ALIAS, X509_CERT_FACTORY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the object responsible for negotiating application layer protocols for the TLS NPN/ALPN extensions.Returns the list of enabled cipher suites, in the order of preference.protected abstract void
initEngine
(SSLEngine engine) Init theSSLEngine
.protected void
initHandler
(SslHandler handler) Init theSslHandler
.final boolean
isClient()
Returns thetrue
if and only if this context is for client-side.final SSLEngine
newEngine
(ByteBufAllocator alloc) Creates a newSSLEngine
.final SSLEngine
newEngine
(ByteBufAllocator alloc, String peerHost, int peerPort) Creates a newSSLEngine
using advisory peer information.protected final SslHandler
newHandler
(ByteBufAllocator alloc, boolean startTls) Create a new SslHandler.protected SslHandler
newHandler
(ByteBufAllocator alloc, boolean startTls, Executor executor) Create a new SslHandler.protected final SslHandler
newHandler
(ByteBufAllocator alloc, String peerHost, int peerPort, boolean startTls) Create a new SslHandler.protected SslHandler
newHandler
(ByteBufAllocator alloc, String peerHost, int peerPort, boolean startTls, Executor executor) final long
Returns the size of the cache used for storing SSL session objects.final SSLSessionContext
Returns theSSLSessionContext
object held by this context.final long
Returns the timeout for the cached SSL session objects, in seconds.Methods inherited from class io.netty.handler.ssl.SslContext
attributes, buildKeyManagerFactory, buildKeyManagerFactory, buildKeyStore, buildTrustManagerFactory, buildTrustManagerFactory, buildTrustManagerFactory, defaultClientProvider, defaultServerProvider, generateKeySpec, isServer, keyStorePassword, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContext, newClientContextInternal, newHandler, newHandler, newHandler, newHandler, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContext, newServerContextInternal, nextProtocols, toApplicationProtocolConfig, toPrivateKey, toPrivateKey, toPrivateKey, toPrivateKeyInternal, toX509Certificates, toX509Certificates, toX509CertificatesInternal
-
Field Details
-
ctx
-
-
Constructor Details
-
DelegatingSslContext
-
-
Method Details
-
isClient
public final boolean isClient()Description copied from class:SslContext
Returns thetrue
if and only if this context is for client-side.- Specified by:
isClient
in classSslContext
-
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.- Overrides:
sessionCacheSize
in classSslContext
-
sessionTimeout
public final long sessionTimeout()Description copied from class:SslContext
Returns the timeout for the cached SSL session objects, in seconds.- Overrides:
sessionTimeout
in classSslContext
-
applicationProtocolNegotiator
Description copied from class:SslContext
Returns the object responsible for negotiating application layer protocols for the TLS NPN/ALPN extensions.- Specified by:
applicationProtocolNegotiator
in classSslContext
-
newEngine
Description copied from class:SslContext
Creates a newSSLEngine
.If
SslProvider.OPENSSL_REFCNT
is used then the object must be released. One way to do this is to wrap in aSslHandler
and insert it into a pipeline. SeeSslContext.newHandler(ByteBufAllocator)
.- Specified by:
newEngine
in classSslContext
- Returns:
- a new
SSLEngine
-
newEngine
Description copied from class:SslContext
Creates a newSSLEngine
using advisory peer information.If
SslProvider.OPENSSL_REFCNT
is used then the object must be released. One way to do this is to wrap in aSslHandler
and insert it into a pipeline. SeeSslContext.newHandler(ByteBufAllocator, String, int)
.- Specified by:
newEngine
in classSslContext
- Parameters:
peerHost
- the non-authoritative name of the hostpeerPort
- the non-authoritative port- Returns:
- a new
SSLEngine
-
newHandler
Description copied from class:SslContext
Create a new SslHandler.- Overrides:
newHandler
in classSslContext
- See Also:
-
newHandler
protected final SslHandler newHandler(ByteBufAllocator alloc, String peerHost, int peerPort, boolean startTls) Description copied from class:SslContext
Create a new SslHandler.- Overrides:
newHandler
in classSslContext
- See Also:
-
newHandler
Description copied from class:SslContext
Create a new SslHandler.- Overrides:
newHandler
in classSslContext
- See Also:
-
newHandler
protected SslHandler newHandler(ByteBufAllocator alloc, String peerHost, int peerPort, boolean startTls, Executor executor) - Overrides:
newHandler
in classSslContext
-
sessionContext
Description copied from class:SslContext
Returns theSSLSessionContext
object held by this context.- Specified by:
sessionContext
in classSslContext
-
initEngine
Init theSSLEngine
. -
initHandler
Init theSslHandler
. This will by default callinitEngine(SSLEngine)
, sub-classes may override this.
-