Class SslEngineConfigurator


  • public class SslEngineConfigurator
    extends java.lang.Object
    Deprecated.
    Please use SslEngineConfigurator.
    SSLEngineConfigurator class from Grizzly project.

    Utility class, which helps to configure SSLEngine. Should be passed to client via configuration properties. Example:

          SslContextConfigurator sslContextConfigurator = new SslContextConfigurator();
          sslContextConfigurator.setTrustStoreFile("...");
          sslContextConfigurator.setTrustStorePassword("...");
          sslContextConfigurator.setTrustStoreType("...");
          sslContextConfigurator.setKeyStoreFile("...");
          sslContextConfigurator.setKeyStorePassword("...");
          sslContextConfigurator.setKeyStoreType("...");
          SslEngineConfigurator sslEngineConfigurator = new SslEngineConfigurator(sslContextConfigurator, true, false,
     false);
          client.getProperties().put(ClientManager.SSL_ENGINE_CONFIGURATOR, sslEngineConfigurator);
     
    Author:
    Alexey Stashok
    • Field Detail

      • sslContext

        protected volatile javax.net.ssl.SSLContext sslContext
        Deprecated.
      • enabledCipherSuites

        protected java.lang.String[] enabledCipherSuites
        Deprecated.
        The list of cipher suites.
      • enabledProtocols

        protected java.lang.String[] enabledProtocols
        Deprecated.
        The list of protocols.
      • clientMode

        protected boolean clientMode
        Deprecated.
        Client mode when handshaking.
      • needClientAuth

        protected boolean needClientAuth
        Deprecated.
        Require client Authentication.
      • wantClientAuth

        protected boolean wantClientAuth
        Deprecated.
        True when requesting authentication.
    • Constructor Detail

      • SslEngineConfigurator

        public SslEngineConfigurator​(javax.net.ssl.SSLContext sslContext)
        Deprecated.
        Create SSL Engine configuration basing on passed SSLContext.
        Parameters:
        sslContext - SSLContext.
      • SslEngineConfigurator

        public SslEngineConfigurator​(javax.net.ssl.SSLContext sslContext,
                                     boolean clientMode,
                                     boolean needClientAuth,
                                     boolean wantClientAuth)
        Deprecated.
        Create SSL Engine configuration basing on passed SSLContext, using passed client mode, need/want client auth parameters.
        Parameters:
        sslContext - SSLContext.
        clientMode - will be configured to work in client mode.
        needClientAuth - client authentication is required.
        wantClientAuth - client should authenticate.
      • SslEngineConfigurator

        public SslEngineConfigurator​(SslContextConfigurator sslContextConfiguration,
                                     boolean clientMode,
                                     boolean needClientAuth,
                                     boolean wantClientAuth)
        Deprecated.
        Create SSL Engine configuration basing on passed SslContextConfigurator. This constructor makes possible to initialize SSLEngine and SSLContext in lazy fashion on first createSSLEngine() call.
        Parameters:
        sslContextConfiguration - SslContextConfigurator.
        clientMode - will be configured to work in client mode.
        needClientAuth - client authentication is required.
        wantClientAuth - client should authenticate.
      • SslEngineConfigurator

        protected SslEngineConfigurator()
        Deprecated.
        Default constructor.
    • Method Detail

      • createSSLEngine

        public javax.net.ssl.SSLEngine createSSLEngine()
        Deprecated.
        Create and configure SSLEngine, basing on current settings.
        Returns:
        SSLEngine.
      • configure

        public javax.net.ssl.SSLEngine configure​(javax.net.ssl.SSLEngine sslEngine)
        Deprecated.
        Configure passed SSLEngine, using current configurator settings
        Parameters:
        sslEngine - SSLEngine to configure.
        Returns:
        configured SSLEngine.
      • isClientMode

        public boolean isClientMode()
        Deprecated.
        Will SSLEngine be configured to work in client mode.
        Returns:
        true, if SSLEngine will be configured to work in client mode, or false for server mode.
      • setClientMode

        public SslEngineConfigurator setClientMode​(boolean clientMode)
        Deprecated.
        Set SSLEngine to be configured to work in client mode.
        Parameters:
        clientMode - true, if SSLEngine will be configured to work in client mode, or false for server mode.
        Returns:
        updated configurator instance.
      • isNeedClientAuth

        public boolean isNeedClientAuth()
        Deprecated.
      • setNeedClientAuth

        public SslEngineConfigurator setNeedClientAuth​(boolean needClientAuth)
        Deprecated.
      • isWantClientAuth

        public boolean isWantClientAuth()
        Deprecated.
      • setWantClientAuth

        public SslEngineConfigurator setWantClientAuth​(boolean wantClientAuth)
        Deprecated.
      • getEnabledCipherSuites

        public java.lang.String[] getEnabledCipherSuites()
        Deprecated.
      • setEnabledCipherSuites

        public SslEngineConfigurator setEnabledCipherSuites​(java.lang.String[] enabledCipherSuites)
        Deprecated.
      • getEnabledProtocols

        public java.lang.String[] getEnabledProtocols()
        Deprecated.
      • setEnabledProtocols

        public SslEngineConfigurator setEnabledProtocols​(java.lang.String[] enabledProtocols)
        Deprecated.
      • isCipherConfigured

        public boolean isCipherConfigured()
        Deprecated.
      • setCipherConfigured

        public SslEngineConfigurator setCipherConfigured​(boolean isCipherConfigured)
        Deprecated.
      • isProtocolConfigured

        public boolean isProtocolConfigured()
        Deprecated.
      • setProtocolConfigured

        public SslEngineConfigurator setProtocolConfigured​(boolean isProtocolConfigured)
        Deprecated.
      • getSslContext

        public javax.net.ssl.SSLContext getSslContext()
        Deprecated.
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object