Examples of SSLHandler


Examples of io.netty.handler.ssl.SslHandler

                                            // downstream
                                            if (secure) {
                                                SSLEngine clientEngine = SSLFactory.getInstance().sslContext().createSSLEngine();
                                                clientEngine.setUseClientMode(true);
                                                outboundChannel.pipeline().addLast("outbound relay ssl", new SslHandler(clientEngine));
                                            }
                                            Logger outboundLogger = LoggerFactory.getLogger("                -->");
                                            if (logger.isDebugEnabled()) {
                                                outboundChannel.pipeline().addLast("outbound relay logger", new LoggingHandler(outboundLogger));
                                            }
                                            outboundChannel.pipeline().addLast(new ProxyRelayHandler(ctx.channel(), 1048576, new RequestInterceptor(null), outboundLogger));


                                            // upstream
                                            if (secure) {
                                                SSLEngine serverEngine = SSLFactory.getInstance().sslContext().createSSLEngine();
                                                serverEngine.setUseClientMode(false);
                                                ctx.channel().pipeline().addLast("upstream relay ssl", new SslHandler(serverEngine));
                                            }
                                            Logger inboundLogger = LoggerFactory.getLogger("<-- ");
                                            if (logger.isDebugEnabled()) {
                                                ctx.channel().pipeline().addLast("upstream relay logger", new LoggingHandler(inboundLogger));
                                            }
View Full Code Here

Examples of org.apache.mina.filter.support.SSLHandler

     *
     * @return <tt>true</tt> if the SSL session has been started, <tt>false</tt> if already started.
     * @throws SSLException if failed to start the SSL session
     */
    public boolean startSSL(IoSession session) throws SSLException {
        SSLHandler handler = getSSLSessionHandler(session);
        boolean started;
        synchronized (handler) {
            if (handler.isOutboundDone()) {
                NextFilter nextFilter = (NextFilter) session
                        .getAttribute(NEXT_FILTER);
                handler.destroy();
                handler.init();
                handler.handshake(nextFilter);
                started = true;
            } else {
                started = false;
            }
        }

        handler.flushScheduledEvents();
        return started;
    }
View Full Code Here

Examples of org.jboss.netty.handler.ssl.SslHandler

  public void channelConnected(ChannelHandlerContext ctx,
      final ChannelStateEvent e) throws Exception {
    ChannelListener listener = this.listenerFactory.createChannelListener(new ObjectChannelImpl(e.getChannel()));
    this.listeners.put(e.getChannel(), listener);
    maxChannels = Math.max(maxChannels, this.listeners.size());
    SslHandler sslHandler = ctx.getPipeline().get(SslHandler.class);
    if (sslHandler != null) {
          sslHandler.handshake().addListener(new ChannelFutureListener() {
            public void operationComplete(ChannelFuture arg0)
                throws Exception {
              onConnection(e.getChannel());
            }
          });
View Full Code Here

Examples of org.jboss.netty.handler.ssl.SslHandler

  public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline pipeline = new DefaultChannelPipeline();

    SSLEngine engine = config.getServerSSLEngine();
      if (engine != null) {
          pipeline.addLast("ssl", new SslHandler(engine)); //$NON-NLS-1$
      }
      pipeline.addLast("decoder", new ObjectDecoder(1 << 20, classLoader, storageManager)); //$NON-NLS-1$
      pipeline.addLast("chunker", new ChunkedWriteHandler()); //$NON-NLS-1$
      pipeline.addLast("encoder", new ObjectEncoder()); //$NON-NLS-1$
      pipeline.addLast("handler", this); //$NON-NLS-1$
View Full Code Here

Examples of org.jboss.netty.handler.ssl.SslHandler

      public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline pipeline = new DefaultChannelPipeline();

        SSLEngine engine = config.getServerSSLEngine();
          if (engine != null) {
              pipeline.addLast("ssl", new SslHandler(engine)); //$NON-NLS-1$
          }
          pipeline.addLast("odbcFrontendProtocol", new PgFrontendProtocol(1 << 20)); //$NON-NLS-1$
          pipeline.addLast("odbcBackendProtocol", new PgBackendProtocol(maxLobSize)); //$NON-NLS-1$
          pipeline.addLast("handler", this); //$NON-NLS-1$
          return pipeline;
View Full Code Here

Examples of org.jboss.netty.handler.ssl.SslHandler

        final ChannelPipeline pipeline = pipeline();

        if (config.sslContext() != null) {
            SSLEngine e = config.sslContext().createSSLEngine();
            config.sslContextListener().onPostCreate(e);
            pipeline.addLast("ssl", new SslHandler(e));
        }

        pipeline.addLast("decoder", new HttpRequestDecoder());

        if (config.aggregateRequestBodyInMemory()) {
View Full Code Here

Examples of org.jboss.netty.handler.ssl.SslHandler

          logger.info("SSLEngine protocols enabled: " +
              Arrays.asList(sslEngine.getEnabledProtocols()));
          // addFirst() will make SSL handling the first stage of decoding
          // and the last stage of encoding this must be added after
          // adding compression handling above
          pipeline.addFirst("ssl", new SslHandler(sslEngine));
        }

        return super.newChannel(pipeline);
      } catch (Exception ex) {
        logger.error("Cannot create SSL channel", ex);
View Full Code Here

Examples of org.jboss.netty.handler.ssl.SslHandler

    @Override
    public ChannelPipeline getPipeline() throws Exception {
      ChannelPipeline pipeline = Channels.pipeline();
      SSLEngine sslEngine = createServerSSLContext().createSSLEngine();
      sslEngine.setUseClientMode(false);
      pipeline.addLast("ssl", new SslHandler(sslEngine));
      return pipeline;
    }
View Full Code Here

Examples of org.jboss.netty.handler.ssl.SslHandler

                        null);
        SSLEngine sslEngine = sslContext.createSSLEngine();
        sslEngine.setUseClientMode(true);
        // addFirst() will make SSL handling the first stage of decoding
        // and the last stage of encoding
        pipeline.addFirst("ssl", new SslHandler(sslEngine));
        return super.newChannel(pipeline);
      } catch (Exception ex) {
        throw new RuntimeException("Cannot create SSL channel", ex);
      }
    }
View Full Code Here

Examples of org.jboss.netty.handler.ssl.SslHandler

        logger.info("SSLEngine protocols enabled: " +
            Arrays.asList(sslEngine.getEnabledProtocols()));
        // addFirst() will make SSL handling the first stage of decoding
        // and the last stage of encoding this must be added after
        // adding compression handling above
        pipeline.addFirst("ssl", new SslHandler(sslEngine));
      }

      if (enableIpFilter) {

        logger.info("Setting up ipFilter with the following rule definition: " +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.