SslContext

cc.otavia.handler.ssl.SslContext
See theSslContext companion object
abstract class SslContext

A secure socket protocol implementation which acts as a factory for SSLEngine and SslHandler. Internally, it is implemented via JDK's SSLContext. === Making your server support SSL/TLS ===

    val pipeline = channel.pipeline()
    val sslCtx = SslContextBuilder.forServer(...).build()
    pipeline.addLast("tls", sslCtx.newHandler())

=== Making your client support SSL/TLS ===

    val pipeline = channel.pipeline()
    val sslCtx = SslContextBuilder.forClient().build()
    pipeline.addLast("tls", sslCtx.newHandler(host, port))

Value parameters

startTls

true if the first write request shouldn't be encrypted by the SSLEngine

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def cipherSuites: List[String]

Returns the list of enabled cipher suites, in the order of preference.

Returns the list of enabled cipher suites, in the order of preference.

Attributes

def isClient: Boolean

Returns the true if and only if this context is for client-side.

Returns the true if and only if this context is for client-side.

Attributes

def newEngine(): SSLEngine

Creates a new SSLEngine.

Creates a new SSLEngine.

Attributes

def newEngine(peerHost: String, peerPort: Int): SSLEngine

Creates a new SSLEngine.

Creates a new SSLEngine.

Value parameters

peerHost

the non-authoritative name of the host

peerPort

the non-authoritative port

Attributes

Returns

a new SSLEngine

def sessionContext: SSLSessionContext

Returns the SSLSessionContext object held by this context.

Returns the SSLSessionContext object held by this context.

Attributes

Concrete methods

def isServer: Boolean

Returns true if and only if this context is for server-side.

Returns true if and only if this context is for server-side.

Attributes

final def newHandler(): SslHandler

Create a new SslHandler.

Create a new SslHandler.

Attributes

def newHandler(peerHost: String, peerPort: Int): SslHandler

Create a new SslHandler.

Create a new SslHandler.

Attributes

def sessionCacheSize: Long

Returns the size of the cache used for storing SSL session objects.

Returns the size of the cache used for storing SSL session objects.

Attributes

def sessionTimeout: Long

Returns the timeout for the cached SSL session objects, in seconds.

Returns the timeout for the cached SSL session objects, in seconds.

Attributes

Concrete fields

val startTls: Boolean