public class SSLFilter extends SSLBaseFilter
Filter
to operate with SSL encrypted data.SSLBaseFilter.CertificateEvent, SSLBaseFilter.HandshakeListener
Modifier and Type | Field and Description |
---|---|
protected int |
maxPendingBytes |
COPY_CLONER, handshakeListeners
Constructor and Description |
---|
SSLFilter() |
SSLFilter(SSLEngineConfigurator serverSSLEngineConfigurator,
SSLEngineConfigurator clientSSLEngineConfigurator)
Build SSLFilter with the given
SSLEngineConfigurator . |
SSLFilter(SSLEngineConfigurator serverSSLEngineConfigurator,
SSLEngineConfigurator clientSSLEngineConfigurator,
boolean renegotiateOnClientAuthWant)
Build SSLFilter with the given
SSLEngineConfigurator . |
Modifier and Type | Method and Description |
---|---|
protected Buffer |
doHandshakeStep(SSLConnectionContext sslCtx,
FilterChainContext ctx,
Buffer inputBuffer,
Buffer tmpAppBuffer0) |
int |
getMaxPendingBytesPerConnection() |
NextAction |
handleWrite(FilterChainContext ctx)
Execute a unit of processing work to be performed, when some data should
be written on channel.
|
protected void |
handshake(Connection<?> connection,
CompletionHandler<SSLEngine> completionHandler,
Object dstAddress,
SSLEngineConfigurator sslEngineConfigurator,
FilterChainContext context) |
void |
handshake(Connection connection,
CompletionHandler<SSLEngine> completionHandler) |
void |
handshake(Connection connection,
CompletionHandler<SSLEngine> completionHandler,
Object dstAddress) |
void |
handshake(Connection connection,
CompletionHandler<SSLEngine> completionHandler,
Object dstAddress,
SSLEngineConfigurator sslEngineConfigurator) |
protected void |
notifyHandshakeComplete(Connection<?> connection,
SSLEngine sslEngine) |
protected void |
notifyHandshakeFailed(Connection connection,
Throwable t) |
void |
setMaxPendingBytesPerConnection(int maxPendingBytes)
Configures the maximum number of bytes that may be queued to be written
for a particular
Connection . |
addHandshakeListener, createOptimizedTransportFilter, doHandshakeStep, doHandshakeSync, getHandshakeTimeout, getPeerCertificateChain, handleEvent, handleRead, notifyHandshakeStart, onFilterChainChanged, removeHandshakeListener, renegotiate, setHandshakeTimeout, unwrapAll, wrapAll
createContext, exceptionOccurred, handleAccept, handleClose, handleConnect, onAdded, onRemoved
public SSLFilter()
public SSLFilter(SSLEngineConfigurator serverSSLEngineConfigurator, SSLEngineConfigurator clientSSLEngineConfigurator)
SSLEngineConfigurator
.serverSSLEngineConfigurator
- SSLEngine configurator for server side connectionsclientSSLEngineConfigurator
- SSLEngine configurator for client side connectionspublic SSLFilter(SSLEngineConfigurator serverSSLEngineConfigurator, SSLEngineConfigurator clientSSLEngineConfigurator, boolean renegotiateOnClientAuthWant)
SSLEngineConfigurator
.serverSSLEngineConfigurator
- SSLEngine configurator for server side connectionsclientSSLEngineConfigurator
- SSLEngine configurator for client side connectionspublic NextAction handleWrite(FilterChainContext ctx) throws IOException
BaseFilter
Filter
may either complete the required processing and
return false, or delegate remaining processing to the next
Filter
in a FilterChain
containing this Filter
by returning true.handleWrite
in interface Filter
handleWrite
in class SSLBaseFilter
ctx
- FilterChainContext
NextAction
instruction for FilterChain
, how it
should continue the executionIOException
public int getMaxPendingBytesPerConnection()
Connection
.
This value is related to the situation when we try to send application
data before SSL handshake completes, so the data should be stored and
sent on wire once handshake will be completed.public void setMaxPendingBytesPerConnection(int maxPendingBytes)
Connection
.
This value is related to the situation when we try to send application
data before SSL handshake completes, so the data should be stored and
sent on wire once handshake will be completed.maxPendingBytes
- maximum number of bytes that may be queued to be
written for a particular Connection
public void handshake(Connection connection, CompletionHandler<SSLEngine> completionHandler) throws IOException
IOException
public void handshake(Connection connection, CompletionHandler<SSLEngine> completionHandler, Object dstAddress) throws IOException
IOException
public void handshake(Connection connection, CompletionHandler<SSLEngine> completionHandler, Object dstAddress, SSLEngineConfigurator sslEngineConfigurator) throws IOException
IOException
protected void handshake(Connection<?> connection, CompletionHandler<SSLEngine> completionHandler, Object dstAddress, SSLEngineConfigurator sslEngineConfigurator, FilterChainContext context) throws IOException
IOException
protected void notifyHandshakeComplete(Connection<?> connection, SSLEngine sslEngine)
notifyHandshakeComplete
in class SSLBaseFilter
protected void notifyHandshakeFailed(Connection connection, Throwable t)
notifyHandshakeFailed
in class SSLBaseFilter
protected Buffer doHandshakeStep(SSLConnectionContext sslCtx, FilterChainContext ctx, Buffer inputBuffer, Buffer tmpAppBuffer0) throws IOException
doHandshakeStep
in class SSLBaseFilter
IOException
Copyright © 2014 Oracle Corporation. All rights reserved.