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 2016/04/05 15:38:17 UTC

[1/3] cxf git commit: Adding a TLS test for an expired cert

Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes dc5025766 -> 8dda906e3


Adding a TLS test for an expired cert

# Conflicts:
#	systests/transports/src/test/java/org/apache/cxf/systest/https/ciphersuites/CipherSuitesTest.java


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

Branch: refs/heads/3.0.x-fixes
Commit: 02d6bdbf3079d8dfbef1dad5e7d5a9514dd0ac34
Parents: dc50257
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Apr 5 12:46:26 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Apr 5 14:04:50 2016 +0100

----------------------------------------------------------------------
 .../https/ciphersuites/CipherSuitesTest.java    |  39 +++++++++++++++++++
 .../src/test/resources/keys/wss40exp.jks        | Bin 0 -> 3941 bytes
 .../src/test/resources/keys/wss40expCA.jks      | Bin 0 -> 858 bytes
 .../ciphersuites-client-expired-cert.xml        |  37 ++++++++++++++++++
 .../https/ciphersuites/ciphersuites-server.xml  |  28 +++++++++++++
 5 files changed, 104 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/02d6bdbf/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 13257f9..f253618 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
@@ -73,6 +73,15 @@ public class CipherSuitesTest extends AbstractBusClientServerTestBase {
         UNRESTRICTED_POLICIES_INSTALLED = ok;
     }
     
+<<<<<<< HEAD
+=======
+    static final String PORT = allocatePort(CipherSuitesServer.class);
+    static final String PORT2 = allocatePort(CipherSuitesServer.class, 2);
+    static final String PORT3 = allocatePort(CipherSuitesServer.class, 3);
+    static final String PORT4 = allocatePort(CipherSuitesServer.class, 4);
+    static final String PORT5 = allocatePort(CipherSuitesServer.class, 5);
+    
+>>>>>>> 3235f4b... Adding a TLS test for an expired cert
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue(
@@ -620,6 +629,36 @@ public class CipherSuitesTest extends AbstractBusClientServerTestBase {
         bus.shutdown(true);
     }
     
+    // Test an expired cert
+    @org.junit.Test
+    public void testExpiredCert() throws Exception {
+        
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = CipherSuitesTest.class.getResource("ciphersuites-client-expired-cert.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, PORT5);
+        
+        try {
+            port.greetMe("Kitty");
+            fail("Failure expected on not being able to negotiate a cipher suite");
+        } catch (Exception ex) {
+            // expected
+        }
+        
+        ((java.io.Closeable)port).close();
+        bus.shutdown(true);
+    }
+    
     private static class NoOpX509TrustManager implements X509TrustManager {
 
         public NoOpX509TrustManager() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/02d6bdbf/systests/transports/src/test/resources/keys/wss40exp.jks
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/resources/keys/wss40exp.jks b/systests/transports/src/test/resources/keys/wss40exp.jks
new file mode 100644
index 0000000..1ee7be7
Binary files /dev/null and b/systests/transports/src/test/resources/keys/wss40exp.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/02d6bdbf/systests/transports/src/test/resources/keys/wss40expCA.jks
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/resources/keys/wss40expCA.jks b/systests/transports/src/test/resources/keys/wss40expCA.jks
new file mode 100644
index 0000000..886d85c
Binary files /dev/null and b/systests/transports/src/test/resources/keys/wss40expCA.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/02d6bdbf/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-client-expired-cert.xml
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-client-expired-cert.xml b/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-client-expired-cert.xml
new file mode 100644
index 0000000..0e92933
--- /dev/null
+++ b/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-client-expired-cert.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="security" resource="keys/wss40expCA.jks"/>
+            </sec:trustManagers>
+            <sec:cipherSuites>
+                <sec:cipherSuite>TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256</sec:cipherSuite>
+            </sec:cipherSuites>
+        </http:tlsClientParameters>
+    </http:conduit>
+</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/02d6bdbf/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-server.xml
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-server.xml b/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-server.xml
index e5b382e..83e6c3f 100644
--- a/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-server.xml
+++ b/systests/transports/src/test/resources/org/apache/cxf/systest/https/ciphersuites/ciphersuites-server.xml
@@ -120,4 +120,32 @@
                      address="https://localhost:${testutil.ports.CipherSuitesServer.4}/SoapContext/HttpsPort" 
                      serviceName="s:SOAPService" 
                      endpointName="e:HttpsPort" depends-on="aes-explicit-tls-settings"/>
+                     
+    <httpj:engine-factory id="expired-cert-tls-settings">
+        <httpj:engine port="${testutil.ports.CipherSuitesServer.5}">
+            <httpj:tlsServerParameters>
+                <sec:keyManagers keyPassword="security">
+                    <sec:keyStore type="jks" password="security" resource="keys/wss40exp.jks"/>
+                </sec:keyManagers>
+                <sec:clientAuthentication want="false" required="false"/>
+                <sec:cipherSuitesFilter>
+                    <sec:include>.*_WITH_AES_.*</sec:include>
+                </sec:cipherSuitesFilter>
+            </httpj:tlsServerParameters>
+        </httpj:engine>
+    </httpj:engine-factory>
+    
+    <jaxws:endpoint xmlns:e="http://apache.org/hello_world/services" 
+                     xmlns:s="http://apache.org/hello_world/services" 
+                     id="AESExpiredCertTLSServer" 
+                     implementor="org.apache.cxf.systest.http.GreeterImpl" 
+                     address="https://localhost:${testutil.ports.CipherSuitesServer.5}/SoapContext/HttpsPort" 
+                     serviceName="s:SOAPService" 
+                     endpointName="e:HttpsPort" depends-on="expired-cert-tls-settings">
+        <jaxws:inInterceptors>
+            <bean class="org.apache.cxf.systest.https.ciphersuites.CipherSuiteChecker">
+                <property name="requiredAlgorithm" value="AES"/>
+            </bean>
+        </jaxws:inInterceptors>
+    </jaxws:endpoint>
 </beans>


[2/3] 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/02c4c318
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/02c4c318
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/02c4c318

Branch: refs/heads/3.0.x-fixes
Commit: 02c4c31878841f4c37e46be486d3158a6f589a15
Parents: 02d6bdb
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Apr 5 14:04:52 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Apr 5 14:04:52 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/02c4c318/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index aac79c2..b74c67c 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -436,6 +436,7 @@ B 7e4eb471fd6b19d73b2e91748a736f6205fc393f
 B 7e82d2f10a1ca14a939d2c63ca4e620f8870e256
 B 7e8d0b4b1cd868272380ca5779e67a15e46cf799
 B 7e95279dd1170f5878687d7eea27f7d7f03a434b
+B 7f17ddd264a0085cde00e06a22400aad43c304cd
 B 7f7cc3c390b95f9d7589eb192538551416c313db
 B 7faee992154aadf83dde26942f424db4c764b5fd
 B 7fb966c9150652273c69852af79d90c3ed7b030e
@@ -790,6 +791,7 @@ B e4858d27b356f577eb31908dd43817681f007a4b
 B e4b2e746d6a70d02f64daab7aca79142e62709ca
 B e4bfc1647e12b39b25bc363bdb9fe8beb2372a3b
 B e4cab6471a5dafedcd5b69418266f03235adf5d6
+B e51e9006d8a6312f21bd782c908190fc27c3640b
 B e545379cdc71ba79bd6c60b4ee788d11db678d24
 B e548a02fa04313fd1b6ec5d9ac78c774e8ad935a
 B e54e39740fdb360f84a74638db1d6ca71490b01a
@@ -944,6 +946,7 @@ M 2e701bcd1cabcc7ae4cb69346eacb8ab278e2827
 M 2fc62cf0f53912b53a93409802f43418d067faf1
 M 318cfdaeb15b8d230829d120f894bec6f15bc836
 M 3228637a5070a25f625fb18fc21a7dd54ce16dfd
+M 3235f4be3d12aee0088910d69bb67bc5db554df9
 M 3348a2999d2693edfeaf1fdd62a94222774186fd
 M 3520a87c8b207f911cdd5e139cc84f2d20634a4e
 M 3656b40f215f9904ea3649163bf2444eeab0c9cc


[3/3] cxf git commit: Fixing merge

Posted by co...@apache.org.
Fixing merge


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

Branch: refs/heads/3.0.x-fixes
Commit: 8dda906e3b62fc8e76f0a5e3115fb61490890ce1
Parents: 02c4c31
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Apr 5 14:07:17 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Apr 5 14:07:17 2016 +0100

----------------------------------------------------------------------
 .../cxf/systest/https/ciphersuites/CipherSuitesTest.java  | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8dda906e/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 f253618..c86817d 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
@@ -51,6 +51,7 @@ public class CipherSuitesTest extends AbstractBusClientServerTestBase {
     static final String PORT2 = allocatePort(CipherSuitesServer.class, 2);
     static final String PORT3 = allocatePort(CipherSuitesServer.class, 3);
     static final String PORT4 = allocatePort(CipherSuitesServer.class, 4);
+    static final String PORT5 = allocatePort(CipherSuitesServer.class, 5);
     
     private static final boolean UNRESTRICTED_POLICIES_INSTALLED;
     static {
@@ -73,15 +74,6 @@ public class CipherSuitesTest extends AbstractBusClientServerTestBase {
         UNRESTRICTED_POLICIES_INSTALLED = ok;
     }
     
-<<<<<<< HEAD
-=======
-    static final String PORT = allocatePort(CipherSuitesServer.class);
-    static final String PORT2 = allocatePort(CipherSuitesServer.class, 2);
-    static final String PORT3 = allocatePort(CipherSuitesServer.class, 3);
-    static final String PORT4 = allocatePort(CipherSuitesServer.class, 4);
-    static final String PORT5 = allocatePort(CipherSuitesServer.class, 5);
-    
->>>>>>> 3235f4b... Adding a TLS test for an expired cert
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue(