You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2015/03/18 14:44:05 UTC

[1/2] cxf git commit: [CXF-6294] - Cannot activate TLSv1.2 cipher suites on client on Java7 - Adding a test

Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes efa91109b -> 1523d2db5


[CXF-6294] - Cannot activate TLSv1.2 cipher suites on client on Java7
 - Adding a test


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

Branch: refs/heads/3.0.x-fixes
Commit: f5cf6d9f71e57a461b772ab1b3890fd98e3a203e
Parents: efa9110
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Fri Mar 13 18:46:23 2015 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Mar 18 13:29:49 2015 +0000

----------------------------------------------------------------------
 .../https/SSLSocketFactoryWrapper.java          | 17 ++++-----
 .../https/ciphersuites/CipherSuitesTest.java    | 25 ++++++++++++-
 .../ciphersuites/ciphersuites-client-tlsv12.xml | 37 ++++++++++++++++++++
 3 files changed, 70 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f5cf6d9f/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLSocketFactoryWrapper.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLSocketFactoryWrapper.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLSocketFactoryWrapper.java
index 6f58e4a..4e635f0 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLSocketFactoryWrapper.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/https/SSLSocketFactoryWrapper.java
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.net.InetAddress;
 import java.net.Socket;
 import java.net.UnknownHostException;
-
 import java.util.ArrayList;
 import java.util.List;
 import java.util.logging.Handler;
@@ -97,19 +96,21 @@ class SSLSocketFactoryWrapper extends SSLSocketFactory {
     private Socket enableCipherSuites(Socket s, Object[] logParams) {
         SSLSocket socket = (SSLSocket)s;
         
-        if ((socket != null) && (ciphers != null)) {
-            socket.setEnabledCipherSuites(ciphers);
+        if (socket == null) {
+            LogUtils.log(LOG, Level.SEVERE,
+                         "PROBLEM_CREATING_OUTBOUND_REQUEST_SOCKET", 
+                         logParams);
+            return socket;
         }
-        if ((socket != null) && (protocol != null)) {
+
+        if (protocol != null) {
             String p[] = findProtocols(protocol, socket.getSupportedProtocols());
             if (p != null) {
                 socket.setEnabledProtocols(p);
             }
         }
-        if (socket == null) {
-            LogUtils.log(LOG, Level.SEVERE,
-                         "PROBLEM_CREATING_OUTBOUND_REQUEST_SOCKET", 
-                         logParams);
+        if (ciphers != null) {
+            socket.setEnabledCipherSuites(ciphers);
         }
 
         return socket;        

http://git-wip-us.apache.org/repos/asf/cxf/blob/f5cf6d9f/systests/transports/src/test/java/org/apache/cxf/systest/https/ciphersuites/CipherSuitesTest.java
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/https/ciphersuites/CipherSuitesTest.java b/systests/transports/src/test/java/org/apache/cxf/systest/https/ciphersuites/CipherSuitesTest.java
index a0cad91..dd8541d 100644
--- a/systests/transports/src/test/java/org/apache/cxf/systest/https/ciphersuites/CipherSuitesTest.java
+++ b/systests/transports/src/test/java/org/apache/cxf/systest/https/ciphersuites/CipherSuitesTest.java
@@ -442,5 +442,28 @@ public class CipherSuitesTest extends AbstractBusClientServerTestBase {
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
-  
+
+    // Both client + server include AES, client enables a TLS v1.2 CipherSuite
+    @org.junit.Test
+    public void testAESIncludedTLSv12() throws Exception {
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = CipherSuitesTest.class.getResource("ciphersuites-client-tlsv12.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+        
+        URL url = SOAPService.WSDL_LOCATION;
+        SOAPService service = new SOAPService(url, SOAPService.SERVICE);
+        assertNotNull("Service is null", service);   
+        final Greeter port = service.getHttpsPort();
+        assertNotNull("Port is null", port);
+        
+        updateAddressPort(port, PORT);
+        
+        assertEquals(port.greetMe("Kitty"), "Hello Kitty");
+        
+        ((java.io.Closeable)port).close();
+        bus.shutdown(true);
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/f5cf6d9f/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-client-tlsv12.xml
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-client-tlsv12.xml b/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-client-tlsv12.xml
new file mode 100644
index 0000000..b0f39ce
--- /dev/null
+++ b/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-client-tlsv12.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ 
+ http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:cxf="http://cxf.apache.org/core" xmlns:p="http://cxf.apache.org/policy" xmlns:sec="http://cxf.apache.org/configuration/security" xsi:schemaLocation="           http://www.springframework.org/schema/beans           http://www.springframework.org/schema/beans/spring-beans.xsd           http://cxf.apache.org/jaxws                           http://cxf.apache.org/schemas/jaxws.xsd           http://cxf.apache.org/transports/http/configuration   http://cxf.apache.org/schemas/configuration/http-conf.xsd           http://cxf.apache.org/configuration/security          http://cxf.apache.org/schemas/configuration/security.xsd           http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd           http://cxf.apache.org/policy http://cxf.apache.org/schemas/poli
 cy.xsd">
+    
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    <http:conduit name="https://localhost:.*">
+        <http:tlsClientParameters disableCNCheck="true" secureSocketProtocol="TLSv1.2">
+            <sec:trustManagers>
+                <sec:keyStore type="jks" password="password" resource="keys/Truststore.jks"/>
+            </sec:trustManagers>
+            <sec:cipherSuites>
+                <sec:cipherSuite>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256</sec:cipherSuite>
+            </sec:cipherSuites>
+        </http:tlsClientParameters>
+    </http:conduit>
+</beans>


[2/2] cxf git commit: Recording .gitmergeinfo Changes

Posted by co...@apache.org.
Recording .gitmergeinfo Changes


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1523d2db
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1523d2db
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1523d2db

Branch: refs/heads/3.0.x-fixes
Commit: 1523d2db534fcd588cfd2d1f3d02cb8ee64a68d0
Parents: f5cf6d9
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Wed Mar 18 13:30:00 2015 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Mar 18 13:30:00 2015 +0000

----------------------------------------------------------------------
 .gitmergeinfo | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1523d2db/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 9f6381b..6e3b23e 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -73,10 +73,12 @@ B 504b427081cfc2213ce0a5c050b16af67ca7ff46
 B 51f433d54a1d11eac25c32b0dd69f12fef62c060
 B 55bda33699ea1c2e84a125253edd594cc2a32ea3
 B 593525139909e081ae809278d301688c0ba03697
+B 5b26ab08f19f6c55a45c0f1f7ddccd09b0a2ed23
 B 5bac26a132e7999bf0bd108d4cffb674873a56ca
 B 5c678face89e4d38b2879bc4679ce3b92ac3aeb0
 B 5e06ba0c4970700477484bd2409a226aa9ec7f0a
 B 5fbd407bac5af5e55bb280125405d75b7add872b
+B 6168d90fab71f2a8811640bfbbf88bfd1eed1848
 B 6256b7c7c42bb01d2cc0d16d659ba1aa3042e7ae
 B 6359c930bb27b0ea589c7c2d7ed552babe4897ed
 B 64f232307444269286b7f14fc3838b07187d4c03
@@ -101,6 +103,7 @@ B 799c5389f754eb588f023b646b8983b50dde00be
 B 7cd4cf67ba5b8a0ddc36c8008bf096b469408f48
 B 7d1f30f76d95f9eddf0bed995120c71bf1a393b3
 B 7e318c4fbfae35680965082a491ca842a23ffd8c
+B 7e8d0b4b1cd868272380ca5779e67a15e46cf799
 B 7e95279dd1170f5878687d7eea27f7d7f03a434b
 B 80014cf0e6fb1ba62ffdb3766acffd2130eef9d6
 B 80d7128a3ba1944a603c73e5e908d86c9bf27648
@@ -136,6 +139,7 @@ B 9ea935fcbf3869f5fa4fd1e75a0a2309cc780415
 B 9fe4c04a1c875b3e8f402268cd9dfe18431b5cc9
 B a2855695896d5084ea288b0fa47457e4b7bfac38
 B a2e1e40d3c185f53741c937e7b861bab2808d70f
+B a2e5fae3a093965b75361210ef475abb9e6abf56
 B a4222c930f7d69608f826c14e4bc7bc9f670097c
 B a4315cb442fa31960cbd47f11e95e81b4a71441d
 B a5aff3e7a43274b3d47cda706aaf8108bd7a9b07
@@ -171,6 +175,7 @@ B d021b9041e00518099947274455b2027326a3c7c
 B d0c5c3defab6dbb9619f8fd291f2e06b685cb03c
 B d391d9371d8505c7774308c4fbbb9bc57ffd34a6
 B d3e9295d3acfe3c970a325bbbafdba83a0d6e83c
+B d4f9674baa811936429271cbf64c4a558282c764
 B d50ffd09c30e606524fb6ed92119d85ccfa13491
 B d54a21628143bc15f51cbe5d63fa42c09d0ab8ac
 B d5b502a60d2934a42e32cb6225224ff75c66aa37
@@ -180,6 +185,7 @@ B d9f624e2eca8affa20243583ace087a8cbba3ac8
 B df947cb1ca2b9e375f99e199ec65b1afece1c963
 B dfecaa60ea6082fda8f2959c083ba2f2f7a03112
 B e242307ad8bbe53788f3e03e9e2f0ca977d01340
+B e441a15af9413bfb24ee1b4ce78e01bf543fc148
 B e548a02fa04313fd1b6ec5d9ac78c774e8ad935a
 B e8514ea3f5fdf33b19d9ddc0639cc1aaf57e1f62
 B e8b8e2bc1b5afa4ad93294ebe1bd723a5a4a8f64
@@ -197,6 +203,7 @@ B f595ca026d56ec5e58a38780677598d8f9d9ded5
 B f71738d894d4143ed57b956ef1dd68aec5b1b41d
 B f7a091afedbc7ca809a7205d7c053a1f5386865e
 B f942e1e15d6c4fa83e305eb7452dca8fc80cbdcf
+B f94861bd6745e92bc1f69acaa907761f3bcc0613
 B f97778f0c21a4dc0f083e840e8157fe2f8528d90
 B fa37d8722d154bbdec9d2acf4da16a04db0a34f1
 B fb94440f6f1d5c7c572b6c0163f275c95073b8ee