Package io.netty.handler.ssl

Examples of io.netty.handler.ssl.SslHandler


        // SSL Support
        if (useSSL) {
          SSLEngine engine = SSLContext.getDefault().createSSLEngine();
          engine.setUseClientMode(true);
          pipeline.addLast("ssl", new SslHandler(engine));
        }

        // Decoders
        pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1000));
        pipeline.addLast("stringDecoder", new StringDecoder(CharsetUtil.UTF_8));
View Full Code Here


            SSLEngine sslEngine = sslContext.createSSLEngine();
            sslEngine.setUseClientMode(false);
            sslEngine.setEnabledCipherSuites(encryptionOptions.cipher_suites);
            sslEngine.setNeedClientAuth(encryptionOptions.require_client_auth);
            sslEngine.setEnabledProtocols(SSLFactory.ACCEPTED_PROTOCOLS);
            SslHandler sslHandler = new SslHandler(sslEngine);
            super.initChannel(channel);
            channel.pipeline().addFirst("ssl", sslHandler);
        }
View Full Code Here

            super.initChannel(channel);
            SSLEngine sslEngine = sslContext.createSSLEngine();
            sslEngine.setUseClientMode(true);
            sslEngine.setEnabledCipherSuites(encryptionOptions.cipher_suites);
            sslEngine.setEnabledProtocols(SSLFactory.ACCEPTED_PROTOCOLS);
            channel.pipeline().addFirst("ssl", new SslHandler(sslEngine));
        }
View Full Code Here

              SSLEngine ssl = new SSLEngineSupplier(sslOptions, false).get();
              if (log.isDebugEnabled()) {
                log.debug("SSL enabled using keystore {}",
                          (null != sslOptions.keystoreFile() ? sslOptions.keystoreFile() : "<DEFAULT>"));
              }
              ch.pipeline().addLast(new SslHandler(ssl));
            }
            if (null != nettyOptions && null != nettyOptions.pipelineConfigurer()) {
              nettyOptions.pipelineConfigurer().accept(ch.pipeline());
            }
            ch.pipeline().addLast(createChannelHandlers(ch));
View Full Code Here

        if (ssl) {
            SSLEngine engine =
                SecureChatSslContextFactory.getClientContext().createSSLEngine();
            engine.setUseClientMode(true);

            pipeline.addLast("ssl", new SslHandler(engine));
        }

        pipeline.addLast("codec", new HttpClientCodec());

        // Remove the following line if you don't want automatic content decompression.
View Full Code Here

        if (ssl) {
            SSLEngine engine =
                SecureChatSslContextFactory.getClientContext().createSSLEngine();
            engine.setUseClientMode(true);

            pipeline.addLast("ssl", new SslHandler(engine));
        }

        pipeline.addLast("codec", new HttpClientCodec());

        // Remove the following line if you don't want automatic content decompression.
View Full Code Here

        // Create a default pipeline implementation.
        ChannelPipeline pipeline = pipeline();

        SSLEngine engine = WebSocketSslServerSslContext.getInstance().getServerContext().createSSLEngine();
        engine.setUseClientMode(false);
        pipeline.addLast("ssl", new SslHandler(engine));

        pipeline.addLast("decoder", new HttpRequestDecoder());
        pipeline.addLast("aggregator", new HttpChunkAggregator(65536));
        pipeline.addLast("encoder", new HttpResponseEncoder());
        pipeline.addLast("handler", new WebSocketSslServerHandler());
View Full Code Here

            SSLEngine sslEngine = sslContext.createSSLEngine();
            sslEngine.setUseClientMode(false);
            sslEngine.setEnabledCipherSuites(encryptionOptions.cipher_suites);
            sslEngine.setNeedClientAuth(encryptionOptions.require_client_auth);

            SslHandler sslHandler = new SslHandler(sslEngine);
            super.initChannel(channel);
            channel.pipeline().addFirst("ssl", sslHandler);
        }
View Full Code Here

        {
            super.initChannel(channel);
            SSLEngine sslEngine = sslContext.createSSLEngine();
            sslEngine.setUseClientMode(true);
            sslEngine.setEnabledCipherSuites(encryptionOptions.cipher_suites);
            channel.pipeline().addFirst("ssl", new SslHandler(sslEngine));
        }
View Full Code Here

               
                @Override
                public void operationComplete(ChannelFuture future) throws Exception {
                    if (future.isSuccess()) {
                        setChannel(future.channel());
                        SslHandler sslHandler = channel.pipeline().get(SslHandler.class);
                        if (sslHandler != null) {
                            session = sslHandler.engine().getSession();
                        }
                    } else {
                        setException((Exception) future.cause());
                    }
                }
View Full Code Here

TOP

Related Classes of io.netty.handler.ssl.SslHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.