knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject knox git commit: [KNOX-680] - Update Knox's HttpClient dependency to latest version
Date Mon, 07 Mar 2016 23:38:45 GMT
Repository: knox
Updated Branches:
  refs/heads/master 62da197bf -> 9c5c6b7ef


[KNOX-680] - Update Knox's HttpClient dependency to latest version

(cherry picked from commit 5f0bfdf8791c28b8ed804bc81ad48c2e1223ea15)


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/9c5c6b7e
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/9c5c6b7e
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/9c5c6b7e

Branch: refs/heads/master
Commit: 9c5c6b7efd66ee1df46240a83c9e639c6e869c32
Parents: 62da197
Author: Kevin Minder <kminder@apache.org>
Authored: Fri Mar 4 17:59:29 2016 -0500
Committer: Kevin Minder <kminder@apache.org>
Committed: Mon Mar 7 18:27:13 2016 -0500

----------------------------------------------------------------------
 CHANGES                                         |  1 +
 .../hadoop/gateway/GatewayMultiFuncTest.java    |  1 -
 .../hadoop/gateway/GatewaySslFuncTest.java      | 31 ++------------------
 pom.xml                                         |  2 +-
 4 files changed, 5 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/9c5c6b7e/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 2877e83..06efd2d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,7 @@ Release Notes - Apache Knox - Version 0.9.0
     * [KNOX-677] - Upgrade to latest Groovy
     * [KNOX-675] - Upgrade Knox's Jetty dependency to latest 9.x
     * [KNOX-678] - Malformed UTF-8 characters in JSON Response
+    * [KNOX-680] - Update Knox's HttpClient dependency to latest version
 ** Bug
 
 ------------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/knox/blob/9c5c6b7e/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayMultiFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayMultiFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayMultiFuncTest.java
index 54390f4..9a6d9c4 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayMultiFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewayMultiFuncTest.java
@@ -81,7 +81,6 @@ public class GatewayMultiFuncTest {
   @BeforeClass
   public static void setupSuite() throws Exception {
     LOG_ENTER();
-    RestAssured.config = newConfig().connectionConfig(connectionConfig().closeIdleConnectionsAfterEachResponse());
     //appenders = NoOpAppender.setUp();
     setupLdap();
     setupGateway();

http://git-wip-us.apache.org/repos/asf/knox/blob/9c5c6b7e/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySslFuncTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySslFuncTest.java
b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySslFuncTest.java
index 3b8eba7..1bbb402 100644
--- a/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySslFuncTest.java
+++ b/gateway-test/src/test/java/org/apache/hadoop/gateway/GatewaySslFuncTest.java
@@ -18,7 +18,6 @@
 package org.apache.hadoop.gateway;
 
 import java.io.File;
-import java.io.IOException;
 import java.net.URL;
 import java.security.KeyManagementException;
 import java.security.NoSuchAlgorithmException;
@@ -33,11 +32,10 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.ServiceLoader;
 import java.util.UUID;
+import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLException;
 import javax.net.ssl.SSLHandshakeException;
 import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSocket;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.X509TrustManager;
 import javax.xml.transform.stream.StreamSource;
@@ -62,7 +60,6 @@ import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.protocol.HttpClientContext;
 import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.conn.ssl.X509HostnameVerifier;
 import org.apache.http.impl.auth.BasicScheme;
 import org.apache.http.impl.client.BasicAuthCache;
 import org.apache.http.impl.client.BasicCredentialsProvider;
@@ -235,14 +232,11 @@ public class GatewaySslFuncTest {
     context.setAuthCache( authCache );
 
     CloseableHttpClient client = HttpClients.custom()
-        .setHostnameVerifier( new TrustAllHosts() )
-        .setSslcontext( createInsecureSslContext() )
         .setSSLSocketFactory(
             new SSLConnectionSocketFactory(
                 createInsecureSslContext(),
                 new String[]{"TLSv1.2"},
                 new String[]{"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"},
-
                 new TrustAllHosts() ) )
         .build();
     HttpGet request = new HttpGet( serviceUrl );
@@ -260,8 +254,6 @@ public class GatewaySslFuncTest {
 
     try {
       client = HttpClients.custom()
-          .setHostnameVerifier( new TrustAllHosts() )
-          .setSslcontext( createInsecureSslContext() )
           .setSSLSocketFactory(
               new SSLConnectionSocketFactory(
                   createInsecureSslContext(),
@@ -277,8 +269,6 @@ public class GatewaySslFuncTest {
     }
 
     client = HttpClients.custom()
-        .setHostnameVerifier( new TrustAllHosts() )
-        .setSslcontext( createInsecureSslContext() )
         .setSSLSocketFactory(
             new SSLConnectionSocketFactory(
                 createInsecureSslContext(),
@@ -294,26 +284,11 @@ public class GatewaySslFuncTest {
     LOG_EXIT();
   }
 
-  public static class TrustAllHosts implements X509HostnameVerifier {
-    @Override
-    public void verify( String host, SSLSocket ssl ) throws IOException {
-      // Trust all hostnames.
-    }
-
-    @Override
-    public void verify( String host, X509Certificate cert ) throws SSLException {
-      // Trust all hostnames.
-    }
-
-    @Override
-    public void verify( String host, String[] cns, String[] subjectAlts ) throws SSLException
{
-      // Trust all hostnames.
-    }
-
+  public static class TrustAllHosts implements HostnameVerifier {
     @Override
     public boolean verify( String host, SSLSession sslSession ) {
       // Trust all hostnames.
-      return false;
+      return true;
     }
   }
 

http://git-wip-us.apache.org/repos/asf/knox/blob/9c5c6b7e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f185dac..b1eb6c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -739,7 +739,7 @@
             <dependency>
                 <groupId>org.apache.httpcomponents</groupId>
                 <artifactId>httpclient</artifactId>
-                <version>4.3.6</version>
+                <version>4.5.2</version>
             </dependency>
             <dependency>
                 <groupId>joda-time</groupId>


Mime
View raw message