public class SSLFilter extends SSLBaseFilter
Filter to operate with SSL encrypted data.SSLBaseFilter.CertificateEvent, SSLBaseFilter.HandshakeListener, SSLBaseFilter.SSLTransportFilterWrapper| 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 SSLEngine |
createClientSSLEngine(SSLConnectionContext sslCtx,
SSLEngineConfigurator sslEngineConfigurator) |
protected Buffer |
doHandshakeStep(SSLConnectionContext sslCtx,
FilterChainContext ctx,
Buffer inputBuffer,
Buffer tmpAppBuffer0) |
SSLEngineConfigurator |
getClientSSLEngineConfigurator() |
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,
boolean forceBeginHandshake) |
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, createSslConnectionContext, doHandshakeStep, doHandshakeSync, getHandshakeTimeout, getOptimizedTransportFilter, getPeerCertificateChain, getServerSSLEngineConfigurator, handleEvent, handleRead, isRenegotiateOnClientAuthWant, notifyHandshakeInit, notifyHandshakeStart, obtainSslConnectionContext, onAdded, onRemoved, removeHandshakeListener, renegotiate, setHandshakeTimeout, setRenegotiationDisabled, unwrapAll, wrapAllcreateContext, exceptionOccurred, handleAccept, handleClose, handleConnect, onFilterChainChanged, toStringpublic 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 connectionsrenegotiateOnClientAuthWant - true, if SSLBaseFilter has to force client authentication during
re-handshake, in case the client didn't send its credentials during the initial handshake in response to
"wantClientAuth" flag. In this case "needClientAuth" flag will be raised and re-handshake will be initiatedpublic SSLEngineConfigurator getClientSSLEngineConfigurator()
SSLEngineConfigurator used by the filter to create new SSLEngine for client-side
Connectionspublic NextAction handleWrite(FilterChainContext ctx) throws IOException
BaseFilterFilter
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 FilterhandleWrite in class SSLBaseFilterctx - FilterChainContextNextAction instruction for FilterChain, how it should continue the executionIOExceptionpublic 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 Connectionpublic void handshake(Connection connection, CompletionHandler<SSLEngine> completionHandler) throws IOException
IOExceptionpublic void handshake(Connection connection, CompletionHandler<SSLEngine> completionHandler, Object dstAddress) throws IOException
IOExceptionpublic void handshake(Connection connection, CompletionHandler<SSLEngine> completionHandler, Object dstAddress, SSLEngineConfigurator sslEngineConfigurator) throws IOException
IOExceptionprotected void handshake(Connection<?> connection, CompletionHandler<SSLEngine> completionHandler, Object dstAddress, SSLEngineConfigurator sslEngineConfigurator, FilterChainContext context, boolean forceBeginHandshake) throws IOException
IOExceptionprotected void notifyHandshakeComplete(Connection<?> connection, SSLEngine sslEngine)
notifyHandshakeComplete in class SSLBaseFilterprotected void notifyHandshakeFailed(Connection connection, Throwable t)
notifyHandshakeFailed in class SSLBaseFilterprotected Buffer doHandshakeStep(SSLConnectionContext sslCtx, FilterChainContext ctx, Buffer inputBuffer, Buffer tmpAppBuffer0) throws IOException
doHandshakeStep in class SSLBaseFilterIOExceptionprotected SSLEngine createClientSSLEngine(SSLConnectionContext sslCtx, SSLEngineConfigurator sslEngineConfigurator)
Copyright © 2017–2020 Oracle Corporation. All rights reserved.