Class SSLFilter

  • All Implemented Interfaces:
    Filter

    public class SSLFilter
    extends SSLBaseFilter
    SSL Filter to operate with SSL encrypted data.
    Author:
    Alexey Stashok
    • Field Detail

      • maxPendingBytes

        protected volatile int maxPendingBytes
    • Constructor Detail

      • SSLFilter

        public SSLFilter()
      • SSLFilter

        public SSLFilter​(SSLEngineConfigurator serverSSLEngineConfigurator,
                         SSLEngineConfigurator clientSSLEngineConfigurator)
        Build SSLFilter with the given SSLEngineConfigurator.
        Parameters:
        serverSSLEngineConfigurator - SSLEngine configurator for server side connections
        clientSSLEngineConfigurator - SSLEngine configurator for client side connections
      • SSLFilter

        public SSLFilter​(SSLEngineConfigurator serverSSLEngineConfigurator,
                         SSLEngineConfigurator clientSSLEngineConfigurator,
                         boolean renegotiateOnClientAuthWant)
        Build SSLFilter with the given SSLEngineConfigurator.
        Parameters:
        serverSSLEngineConfigurator - SSLEngine configurator for server side connections
        clientSSLEngineConfigurator - SSLEngine configurator for client side connections
        renegotiateOnClientAuthWant - 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 initiated
    • Method Detail

      • getMaxPendingBytesPerConnection

        public int getMaxPendingBytesPerConnection()
        Returns:
        the maximum number of bytes that may be queued to be written to a particular 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.
      • setMaxPendingBytesPerConnection

        public void setMaxPendingBytesPerConnection​(int maxPendingBytes)
        Configures the maximum number of bytes that may be queued to be written for a particular 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.
        Parameters:
        maxPendingBytes - maximum number of bytes that may be queued to be written for a particular Connection
      • handshake

        public void handshake​(Connection connection,
                              CompletionHandler<javax.net.ssl.SSLEngine> completionHandler)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • handshake

        public void handshake​(Connection connection,
                              CompletionHandler<javax.net.ssl.SSLEngine> completionHandler,
                              java.lang.Object dstAddress)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • handshake

        public void handshake​(Connection connection,
                              CompletionHandler<javax.net.ssl.SSLEngine> completionHandler,
                              java.lang.Object dstAddress,
                              SSLEngineConfigurator sslEngineConfigurator)
                       throws java.io.IOException
        Throws:
        java.io.IOException