Top Inners Fields Constructors Methods
io.undertow.protocols.ssl

pack-priv Class SNISSLEngine

extends SSLEngine
Class Inheritance
Imports
java.nio.ByteBuffer, java.nio.channels.ClosedChannelException, java.security.Principal, java.security.cert.Certificate, java.util.List, java.util.concurrent.atomic.AtomicInteger, .AtomicReference, java.util.function.Function, javax.net.ssl.SNIServerName, .SSLContext, .SSLEngine, .SSLEngineResult, .SSLException, .SSLParameters, .SSLPeerUnverifiedException, .SSLSession, .SSLSessionContext, javax.security.cert.X509Certificate, io.undertow.UndertowMessages

Author
David M. Lloyd

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv static final SSLEngine
private final AtomicReference<SSLEngine>
pack-priv static final int
pack-priv static final int
pack-priv static final int
private static final SSLEngineResult
private Function<SSLEngine, SSLEngine>
private static final SSLEngineResult

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
SNISSLEngine(final SNIContextMatcher selector, final String host, final int port)

Method Summary

Modifier and TypeMethod and Description
public void
beginHandshake()

Implements abstract javax.net.ssl.SSLEngine.beginHandshake.

Initiates handshaking (initial or renegotiation) on this SSLEngine.

public void
closeInbound()

Implements abstract javax.net.ssl.SSLEngine.closeInbound.

Signals that no more inbound network data will be sent to this SSLEngine.

public void
closeOutbound()

Implements abstract javax.net.ssl.SSLEngine.closeOutbound.

Signals that no more outbound application data will be sent on this SSLEngine.

public Runnable
getDelegatedTask()

Implements abstract javax.net.ssl.SSLEngine.getDelegatedTask.

Returns a delegated Runnable task for this SSLEngine.

public String[]
getEnabledCipherSuites()

Implements abstract javax.net.ssl.SSLEngine.getEnabledCipherSuites.

Returns the names of the SSL cipher suites which are currently enabled for use on this engine.

public String[]
getEnabledProtocols()

Implements abstract javax.net.ssl.SSLEngine.getEnabledProtocols.

Returns the names of the protocol versions which are currently enabled for use with this SSLEngine.

public boolean
getEnableSessionCreation()

Implements abstract javax.net.ssl.SSLEngine.getEnableSessionCreation.

Returns true if new SSL sessions may be established by this engine.

public SSLSession
getHandshakeSession()

Overrides javax.net.ssl.SSLEngine.getHandshakeSession.

Returns the SSLSession being constructed during a SSL/TLS/DTLS handshake.

public SSLEngineResult.HandshakeStatus
getHandshakeStatus()

Implements abstract javax.net.ssl.SSLEngine.getHandshakeStatus.

Returns the current handshake status for this SSLEngine.

public boolean
getNeedClientAuth()

Implements abstract javax.net.ssl.SSLEngine.getNeedClientAuth.

Returns true if the engine will require client authentication.

public String
getPeerHost()

Overrides javax.net.ssl.SSLEngine.getPeerHost.

Returns the host name of the peer.

public int
getPeerPort()

Overrides javax.net.ssl.SSLEngine.getPeerPort.

Returns the port number of the peer.

public Function<SSLEngine, SSLEngine>
public SSLSession
getSession()

Implements abstract javax.net.ssl.SSLEngine.getSession.

Returns the SSLSession in use in this SSLEngine.

public SSLParameters
getSSLParameters()

Overrides javax.net.ssl.SSLEngine.getSSLParameters.

Returns the SSLParameters in effect for this SSLEngine.

public String[]
getSupportedCipherSuites()

Implements abstract javax.net.ssl.SSLEngine.getSupportedCipherSuites.

Returns the names of the cipher suites which could be enabled for use on this engine.

public String[]
getSupportedProtocols()

Implements abstract javax.net.ssl.SSLEngine.getSupportedProtocols.

Returns the names of the protocols which could be enabled for use with this SSLEngine.

public boolean
getUseClientMode()

Implements abstract javax.net.ssl.SSLEngine.getUseClientMode.

Returns true if the engine is set to use client mode when handshaking.

public boolean
getWantClientAuth()

Implements abstract javax.net.ssl.SSLEngine.getWantClientAuth.

Returns true if the engine will request client authentication.

public boolean
isInboundDone()

Implements abstract javax.net.ssl.SSLEngine.isInboundDone.

Returns whether unwrap(ByteBuffer, ByteBuffer) will accept any more inbound data messages.

public boolean
isOutboundDone()

Implements abstract javax.net.ssl.SSLEngine.isOutboundDone.

Returns whether wrap(ByteBuffer, ByteBuffer) will produce any more outbound data messages.

public void
setEnabledCipherSuites(final String[]
Names of all the cipher suites to enable
cipherSuites
)

Implements abstract javax.net.ssl.SSLEngine.setEnabledCipherSuites.

Sets the cipher suites enabled for use on this engine.

public void
setEnabledProtocols(final String[]
Names of all the protocols to enable.
protocols
)

Implements abstract javax.net.ssl.SSLEngine.setEnabledProtocols.

Set the protocol versions enabled for use on this engine.

public void
setEnableSessionCreation(final boolean
true indicates that sessions may be created; this is the default. false indicates that an existing session must be resumed
flag
)

Implements abstract javax.net.ssl.SSLEngine.setEnableSessionCreation.

Controls whether new SSL sessions may be established by this engine.

public void
setNeedClientAuth(final boolean
set to true if client authentication is required, or false if no client authentication is desired.
clientAuth
)

Implements abstract javax.net.ssl.SSLEngine.setNeedClientAuth.

Configures the engine to require client authentication.

public void
public void
setSSLParameters(final SSLParameters
the parameters
params
)

Overrides javax.net.ssl.SSLEngine.setSSLParameters.

Applies SSLParameters to this engine.

public void
setUseClientMode(final boolean
true if the engine should start its handshaking in "client" mode
clientMode
)

Implements abstract javax.net.ssl.SSLEngine.setUseClientMode.

Configures the engine to use client (or server) mode when handshaking.

public void
setWantClientAuth(final boolean
set to true if client authentication is requested, or false if no client authentication is desired.
want
)

Implements abstract javax.net.ssl.SSLEngine.setWantClientAuth.

Configures the engine to request client authentication.

public SSLEngineResult
unwrap(final ByteBuffer
a ByteBuffer containing inbound network data.
src
,
final ByteBuffer[]
an array of ByteBuffers to hold inbound application data.
dsts
,
final int
The offset within the buffer array of the first buffer from which bytes are to be transferred; it must be non-negative and no larger than dsts.length.
offset
,
final int
The maximum number of buffers to be accessed; it must be non-negative and no larger than dsts.length - offset.
length
)

Implements abstract javax.net.ssl.SSLEngine.unwrap.

Attempts to decode SSL/TLS/DTLS network data into a subsequence of plaintext application data buffers.

public SSLEngineResult
unwrap(final ByteBuffer
a ByteBuffer containing inbound network data.
src
,
final ByteBuffer
a ByteBuffer to hold inbound application data.
dst
)

Overrides javax.net.ssl.SSLEngine.unwrap.

Attempts to decode SSL/TLS/DTLS network data into a plaintext application data buffer.

public SSLEngineResult
unwrap(final ByteBuffer
a ByteBuffer containing inbound network data.
src
,
final ByteBuffer[]
an array of ByteBuffers to hold inbound application data.
dsts
)

Overrides javax.net.ssl.SSLEngine.unwrap.

Attempts to decode SSL/TLS/DTLS network data into a sequence of plaintext application data buffers.

public SSLEngineResult
wrap(final ByteBuffer[]
an array of ByteBuffers containing the outbound application data
srcs
,
final int
The offset within the buffer array of the first buffer from which bytes are to be retrieved; it must be non-negative and no larger than srcs.length
offset
,
final int
The maximum number of buffers to be accessed; it must be non-negative and no larger than srcs.length - offset
length
,
final ByteBuffer
a ByteBuffer to hold outbound network data
dst
)

Implements abstract javax.net.ssl.SSLEngine.wrap.

Attempts to encode plaintext bytes from a subsequence of data buffers into SSL/TLS/DTLS network data.

public SSLEngineResult
wrap(final ByteBuffer
a ByteBuffer containing outbound application data
src
,
final ByteBuffer
a ByteBuffer to hold outbound network data
dst
)

Overrides javax.net.ssl.SSLEngine.wrap.

Attempts to encode a buffer of plaintext application data into SSL/TLS/DTLS network data.

public SSLEngineResult
wrap(final ByteBuffer[]
an array of ByteBuffers containing the outbound application data
srcs
,
final ByteBuffer
a ByteBuffer to hold outbound network data
dst
)

Overrides javax.net.ssl.SSLEngine.wrap.

Attempts to encode plaintext bytes from a sequence of data buffers into SSL/TLS/DTLS network data.

Inherited from javax.net.ssl.SSLEngine:
getApplicationProtocolgetHandshakeApplicationProtocolgetHandshakeApplicationProtocolSelectorsetHandshakeApplicationProtocolSelector