hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1781462 - in /httpcomponents/httpcore/trunk: httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/ httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/bootstrap/ httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/
Date Thu, 02 Feb 2017 19:43:06 GMT
Author: olegk
Date: Thu Feb  2 19:43:06 2017
New Revision: 1781462

URL: http://svn.apache.org/viewvc?rev=1781462&view=rev
Log:
Pass original HttpHost to TlsStrategy#upgrade if available

Modified:
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ClientTlsStrategy.java
    httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ServerTlsStrategy.java
    httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/bootstrap/HttpAsyncRequester.java
    httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicClientTlsStrategy.java
    httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicServerTlsStrategy.java
    httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/TlsStrategy.java

Modified: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ClientTlsStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ClientTlsStrategy.java?rev=1781462&r1=1781461&r2=1781462&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ClientTlsStrategy.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ClientTlsStrategy.java
Thu Feb  2 19:43:06 2017
@@ -31,6 +31,7 @@ import java.net.SocketAddress;
 
 import javax.net.ssl.SSLContext;
 
+import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.nio.ssl.TlsStrategy;
 import org.apache.hc.core5.reactor.ssl.SSLBufferManagement;
 import org.apache.hc.core5.reactor.ssl.SSLSessionInitializer;
@@ -87,10 +88,11 @@ public class H2ClientTlsStrategy impleme
     @Override
     public void upgrade(
             final TransportSecurityLayer tlsSession,
-            final String scheme,
+            final HttpHost host,
             final SocketAddress localAddress,
             final SocketAddress remoteAddress,
             final String... parameters) {
+        final String scheme = host != null ? host.getSchemeName() : null;
         if ("https".equalsIgnoreCase(scheme)) {
             tlsSession.start(sslContext, sslBufferManagement,
                     H2TlsSupport.decorateInitializer(initializer), verifier);

Modified: httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ServerTlsStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ServerTlsStrategy.java?rev=1781462&r1=1781461&r2=1781462&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ServerTlsStrategy.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/H2ServerTlsStrategy.java
Thu Feb  2 19:43:06 2017
@@ -32,6 +32,7 @@ import java.net.SocketAddress;
 
 import javax.net.ssl.SSLContext;
 
+import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.nio.ssl.TlsStrategy;
 import org.apache.hc.core5.reactor.ssl.SSLBufferManagement;
 import org.apache.hc.core5.reactor.ssl.SSLSessionInitializer;
@@ -93,7 +94,7 @@ public class H2ServerTlsStrategy impleme
     @Override
     public void upgrade(
             final TransportSecurityLayer tlsSession,
-            final String scheme,
+            final HttpHost host,
             final SocketAddress localAddress,
             final SocketAddress remoteAddress,
             final String... parameters) {

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/bootstrap/HttpAsyncRequester.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/bootstrap/HttpAsyncRequester.java?rev=1781462&r1=1781461&r2=1781462&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/bootstrap/HttpAsyncRequester.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/bootstrap/HttpAsyncRequester.java
Thu Feb  2 19:43:06 2017
@@ -124,7 +124,7 @@ public class HttpAsyncRequester extends
                             if (tlsStrategy != null && session instanceof TransportSecurityLayer)
{
                                 tlsStrategy.upgrade(
                                         (TransportSecurityLayer) session,
-                                        host.getSchemeName(),
+                                        host,
                                         session.getLocalAddress(),
                                         session.getRemoteAddress());
                             }

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicClientTlsStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicClientTlsStrategy.java?rev=1781462&r1=1781461&r2=1781462&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicClientTlsStrategy.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicClientTlsStrategy.java
Thu Feb  2 19:43:06 2017
@@ -31,6 +31,7 @@ import java.net.SocketAddress;
 
 import javax.net.ssl.SSLContext;
 
+import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.reactor.ssl.SSLBufferManagement;
 import org.apache.hc.core5.reactor.ssl.SSLSessionInitializer;
 import org.apache.hc.core5.reactor.ssl.SSLSessionVerifier;
@@ -86,10 +87,11 @@ public class BasicClientTlsStrategy impl
     @Override
     public void upgrade(
             final TransportSecurityLayer tlsSession,
-            final String scheme,
+            final HttpHost host,
             final SocketAddress localAddress,
             final SocketAddress remoteAddress,
             final String... parameters) {
+        final String scheme = host != null ? host.getSchemeName() : null;
         if ("https".equalsIgnoreCase(scheme)) {
             tlsSession.start(sslContext, sslBufferManagement, initializer, verifier);
         }

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicServerTlsStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicServerTlsStrategy.java?rev=1781462&r1=1781461&r2=1781462&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicServerTlsStrategy.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/BasicServerTlsStrategy.java
Thu Feb  2 19:43:06 2017
@@ -32,6 +32,7 @@ import java.net.SocketAddress;
 
 import javax.net.ssl.SSLContext;
 
+import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.reactor.ssl.SSLBufferManagement;
 import org.apache.hc.core5.reactor.ssl.SSLSessionInitializer;
 import org.apache.hc.core5.reactor.ssl.SSLSessionVerifier;
@@ -92,7 +93,7 @@ public class BasicServerTlsStrategy impl
     @Override
     public void upgrade(
             final TransportSecurityLayer tlsSession,
-            final String scheme,
+            final HttpHost host,
             final SocketAddress localAddress,
             final SocketAddress remoteAddress,
             final String... parameters) {

Modified: httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/TlsStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/TlsStrategy.java?rev=1781462&r1=1781461&r2=1781462&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/TlsStrategy.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/TlsStrategy.java
Thu Feb  2 19:43:06 2017
@@ -29,6 +29,7 @@ package org.apache.hc.core5.http.nio.ssl
 
 import java.net.SocketAddress;
 
+import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.reactor.ssl.TransportSecurityLayer;
 
 /**
@@ -40,7 +41,7 @@ public interface TlsStrategy {
 
     void upgrade(
             TransportSecurityLayer tlsSession,
-            String scheme,
+            HttpHost host,
             SocketAddress localAddress,
             SocketAddress remoteAddress,
             String... parameters);



Mime
View raw message