public class SNIFilter
extends org.glassfish.grizzly.ssl.SSLFilter
Filter implementation.
This filter supports SNI extension on both client and server sides, however
the client side logic works on JDK 7+ only.
On the server-side this filter allows developers to set custom
SSLEngineConfigurator, based on the host name provided by the client
in the SSL CLIENT_HELLO message.
An SNIServerConfigResolver registered via setServerSSLConfigResolver(org.glassfish.grizzly.sni.SNIServerConfigResolver)
would be responsible for customizing SSLEngineConfigurator.
On the other hand for client-side it's not mandatory to register SNIClientConfigResolver,
because the host name information could be obtained from the Connection.getPeerAddress().
However SNIClientConfigResolver could be used to customize the host name.| Constructor and Description |
|---|
SNIFilter() |
SNIFilter(org.glassfish.grizzly.ssl.SSLEngineConfigurator serverSSLEngineConfigurator,
org.glassfish.grizzly.ssl.SSLEngineConfigurator clientSSLEngineConfigurator)
Construct an SNIFilter with the given default client and server
side
SSLEngineConfigurator. |
SNIFilter(org.glassfish.grizzly.ssl.SSLEngineConfigurator serverSSLEngineConfigurator,
org.glassfish.grizzly.ssl.SSLEngineConfigurator clientSSLEngineConfigurator,
boolean renegotiateOnClientAuthWant)
Construct an SNIFilter with the given default
SSLEngineConfigurator. |
| Modifier and Type | Method and Description |
|---|---|
protected org.glassfish.grizzly.ssl.SSLBaseFilter.SSLTransportFilterWrapper |
createOptimizedTransportFilter(org.glassfish.grizzly.filterchain.TransportFilter childFilter) |
SNIClientConfigResolver |
getClientSSLConfigResolver() |
SNIServerConfigResolver |
getServerSSLConfigResolver() |
org.glassfish.grizzly.filterchain.NextAction |
handleConnect(org.glassfish.grizzly.filterchain.FilterChainContext ctx) |
org.glassfish.grizzly.filterchain.NextAction |
handleRead(org.glassfish.grizzly.filterchain.FilterChainContext ctx) |
void |
setClientSSLConfigResolver(SNIClientConfigResolver resolver)
Sets
SNIClientConfigResolver, which is responsible for customizing
SSLEngineConfigurator and SNI host name to be sent to a server. |
void |
setServerSSLConfigResolver(SNIServerConfigResolver resolver)
Sets
SNIServerConfigResolver, which is responsible for customizing
SSLEngineConfigurator for newly accepted Connections,
based on SNI host name information sent by a client. |
createClientSSLEngine, doHandshakeStep, getClientSSLEngineConfigurator, getMaxPendingBytesPerConnection, handleWrite, handshake, handshake, handshake, handshake, notifyHandshakeComplete, notifyHandshakeFailed, setMaxPendingBytesPerConnectionaddHandshakeListener, createSslConnectionContext, doHandshakeStep, doHandshakeSync, getHandshakeTimeout, getOptimizedTransportFilter, getPeerCertificateChain, getServerSSLEngineConfigurator, handleEvent, isRenegotiateOnClientAuthWant, notifyHandshakeStart, obtainSslConnectionContext, onAdded, onRemoved, removeHandshakeListener, renegotiate, setHandshakeTimeout, setRenegotiationDisabled, unwrapAll, wrapAllpublic SNIFilter()
public SNIFilter(org.glassfish.grizzly.ssl.SSLEngineConfigurator serverSSLEngineConfigurator,
org.glassfish.grizzly.ssl.SSLEngineConfigurator clientSSLEngineConfigurator)
SSLEngineConfigurator.serverSSLEngineConfigurator - clientSSLEngineConfigurator - public SNIFilter(org.glassfish.grizzly.ssl.SSLEngineConfigurator serverSSLEngineConfigurator,
org.glassfish.grizzly.ssl.SSLEngineConfigurator clientSSLEngineConfigurator,
boolean renegotiateOnClientAuthWant)
SSLEngineConfigurator.serverSSLEngineConfigurator - SSLEngine configurator for server side connectionsclientSSLEngineConfigurator - SSLEngine configurator for client side connectionsrenegotiateOnClientAuthWant - public SNIServerConfigResolver getServerSSLConfigResolver()
SNIServerConfigResolver, which is responsible for customizing
SSLEngineConfigurator for newly accepted Connections,
based on SNI host name information sent by a clientpublic void setServerSSLConfigResolver(SNIServerConfigResolver resolver)
SNIServerConfigResolver, which is responsible for customizing
SSLEngineConfigurator for newly accepted Connections,
based on SNI host name information sent by a client.resolver - SNIServerConfigResolverpublic SNIClientConfigResolver getClientSSLConfigResolver()
SNIClientConfigResolver, which is responsible for customizing
SSLEngineConfigurator and SNI host name to be sent to a serverpublic void setClientSSLConfigResolver(SNIClientConfigResolver resolver)
SNIClientConfigResolver, which is responsible for customizing
SSLEngineConfigurator and SNI host name to be sent to a server.resolver - protected org.glassfish.grizzly.ssl.SSLBaseFilter.SSLTransportFilterWrapper createOptimizedTransportFilter(org.glassfish.grizzly.filterchain.TransportFilter childFilter)
createOptimizedTransportFilter in class org.glassfish.grizzly.ssl.SSLBaseFilterpublic org.glassfish.grizzly.filterchain.NextAction handleConnect(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
throws IOException
handleConnect in interface org.glassfish.grizzly.filterchain.FilterhandleConnect in class org.glassfish.grizzly.filterchain.BaseFilterIOExceptionpublic org.glassfish.grizzly.filterchain.NextAction handleRead(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
throws IOException
handleRead in interface org.glassfish.grizzly.filterchain.FilterhandleRead in class org.glassfish.grizzly.ssl.SSLBaseFilterIOExceptionCopyright © 2020 Oracle Corporation. All Rights Reserved.