/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
/** * Create and configure {@link SSLEngine} using this context configuration. * * @return {@link SSLEngine}. */ public SSLEngine createSSLEngine() { return createSSLEngine(null, -1); }
protected SSLEngine createClientSSLEngine( final SSLConnectionContext sslCtx, final SSLEngineConfigurator sslEngineConfigurator) { return IS_JDK7_OR_HIGHER ? sslEngineConfigurator.createSSLEngine( HostNameResolver.getPeerHostName(sslCtx.getConnection()), -1) : sslEngineConfigurator.createSSLEngine(); }
protected SSLEngine createClientSSLEngine( final SSLConnectionContext sslCtx, final SSLEngineConfigurator sslEngineConfigurator) { return IS_JDK7_OR_HIGHER ? sslEngineConfigurator.createSSLEngine( HostNameResolver.getPeerHostName(sslCtx.getConnection()), -1) : sslEngineConfigurator.createSSLEngine(); }
protected SSLEngine createClientSSLEngine( final SSLConnectionContext sslCtx, final SSLEngineConfigurator sslEngineConfigurator) { return IS_JDK7_OR_HIGHER ? sslEngineConfigurator.createSSLEngine( HostNameResolver.getPeerHostName(sslCtx.getConnection()), -1) : sslEngineConfigurator.createSSLEngine(); }
protected SSLEngine createClientSSLEngine( final SSLConnectionContext sslCtx, final SSLEngineConfigurator sslEngineConfigurator) { return IS_JDK7_OR_HIGHER ? sslEngineConfigurator.createSSLEngine( HostNameResolver.getPeerHostName(sslCtx.getConnection()), -1) : sslEngineConfigurator.createSSLEngine(); }
protected SSLEngine createClientSSLEngine( final SSLConnectionContext sslCtx, final SSLEngineConfigurator sslEngineConfigurator) { return IS_JDK7_OR_HIGHER ? sslEngineConfigurator.createSSLEngine( HostNameResolver.getPeerHostName(sslCtx.getConnection()), -1) : sslEngineConfigurator.createSSLEngine(); }
protected SSLEngine createClientSSLEngine( final SSLConnectionContext sslCtx, final SSLEngineConfigurator sslEngineConfigurator) { return IS_JDK7_OR_HIGHER ? sslEngineConfigurator.createSSLEngine( HostNameResolver.getPeerHostName(sslCtx.getConnection()), -1) : sslEngineConfigurator.createSSLEngine(); }
protected SSLEngine createClientSSLEngine( final SSLConnectionContext sslCtx, final SSLEngineConfigurator sslEngineConfigurator) { return IS_JDK7_OR_HIGHER ? sslEngineConfigurator.createSSLEngine( HostNameResolver.getPeerHostName(sslCtx.getConnection()), -1) : sslEngineConfigurator.createSSLEngine(); }
@Override public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException { if (event.type() == SSLSwitchingEvent.class) { final SSLSwitchingEvent se = (SSLSwitchingEvent) event; final boolean isSecure = se.isSecure(); CONNECTION_IS_SECURE.set(se.getConnection(), isSecure); // if enabling security - create SSLEngine here, because default // Grizzly SSLFilter will use host/port info from the Connection, rather // than request URL. Specifically this doesn't work with CONNECT tunnels. if (isSecure && SSLUtils.getSSLEngine(ctx.getConnection()) == null) { // if SSLEngine is not yet set for the connection - initialize it final SSLEngine sslEngine = getClientSSLEngineConfigurator() .createSSLEngine(se.getHost(), se.getPort() == -1 ? 443 : se.getPort() ); sslEngine.beginHandshake(); SSLUtils.setSSLEngine(ctx.getConnection(), sslEngine); } return ctx.getStopAction(); } return ctx.getInvokeAction(); }