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 2014/12/11 16:39:31 UTC
cxf git commit: Moving SSLv3 tests to systests/transports
Repository: cxf
Updated Branches:
refs/heads/master b843c1471 -> d2d1acbbe
Moving SSLv3 tests to systests/transports
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d2d1acbb
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d2d1acbb
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d2d1acbb
Branch: refs/heads/master
Commit: d2d1acbbe3bc32c982092894196dedfdd1a0d779
Parents: b843c14
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Dec 11 15:39:05 2014 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Dec 11 15:39:24 2014 +0000
----------------------------------------------------------------------
systests/transports/pom.xml | 15 ++
.../apache/cxf/systest/https/SSLv3Server.java | 47 +++++
.../org/apache/cxf/systest/https/SSLv3Test.java | 204 ++++++++++++++++++
.../src/test/resources/logging.properties | 74 +++++++
.../cxf/systest/https/sslv3-client-allow.xml | 34 +++
.../apache/cxf/systest/https/sslv3-client.xml | 33 +++
.../apache/cxf/systest/https/sslv3-server.xml | 100 +++++++++
.../org/apache/cxf/systest/ws/ssl/SSLTest.java | 209 -------------------
.../org/apache/cxf/systest/ws/ssl/Server.java | 47 -----
.../apache/cxf/systest/ws/ssl/DoubleItSSL.wsdl | 112 ----------
.../apache/cxf/systest/ws/ssl/client-ssl3.xml | 34 ---
.../org/apache/cxf/systest/ws/ssl/client.xml | 34 ---
.../org/apache/cxf/systest/ws/ssl/server.xml | 95 ---------
13 files changed, 507 insertions(+), 531 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/transports/pom.xml
----------------------------------------------------------------------
diff --git a/systests/transports/pom.xml b/systests/transports/pom.xml
index c60028f..4af8557 100644
--- a/systests/transports/pom.xml
+++ b/systests/transports/pom.xml
@@ -31,6 +31,21 @@
<description>Apache CXF Transport System Tests</description>
<url>http://cxf.apache.org</url>
<build>
+ <testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
+ <testResources>
+ <testResource>
+ <directory>src/test/java</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </testResource>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </testResource>
+ </testResources>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/transports/src/test/java/org/apache/cxf/systest/https/SSLv3Server.java
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/https/SSLv3Server.java b/systests/transports/src/test/java/org/apache/cxf/systest/https/SSLv3Server.java
new file mode 100644
index 0000000..7832212
--- /dev/null
+++ b/systests/transports/src/test/java/org/apache/cxf/systest/https/SSLv3Server.java
@@ -0,0 +1,47 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.systest.https;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+public class SSLv3Server extends AbstractBusTestServerBase {
+
+ public SSLv3Server() {
+
+ }
+
+ protected void run() {
+ URL busFile = Server.class.getResource("sslv3-server.xml");
+ Bus busLocal = new SpringBusFactory().createBus(busFile);
+ BusFactory.setDefaultBus(busLocal);
+ setBus(busLocal);
+
+ try {
+ new SSLv3Server();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/transports/src/test/java/org/apache/cxf/systest/https/SSLv3Test.java
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/https/SSLv3Test.java b/systests/transports/src/test/java/org/apache/cxf/systest/https/SSLv3Test.java
new file mode 100644
index 0000000..99381e7
--- /dev/null
+++ b/systests/transports/src/test/java/org/apache/cxf/systest/https/SSLv3Test.java
@@ -0,0 +1,204 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.systest.https;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManager;
+import javax.xml.ws.BindingProvider;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.configuration.jsse.SSLUtils;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.hello_world.Greeter;
+import org.apache.hello_world.services.SOAPService;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+/**
+ * A set of tests SSL v3 protocol support. It should be disallowed by default on both the
+ * (Jetty) server and CXF client side.
+ */
+public class SSLv3Test extends AbstractBusClientServerTestBase {
+ static final String PORT = allocatePort(SSLv3Server.class);
+ static final String PORT2 = allocatePort(SSLv3Server.class, 2);
+ static final String PORT3 = allocatePort(SSLv3Server.class, 3);
+
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue(
+ "Server failed to launch",
+ // run the server in the same process
+ // set this to false to fork
+ launchServer(SSLv3Server.class, true)
+ );
+ }
+
+ @AfterClass
+ public static void cleanup() throws Exception {
+ stopAllServers();
+ }
+
+ @org.junit.Test
+ public void testSSLv3ServerNotAllowedByDefault() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = SSLv3Test.class.getResource("sslv3-client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ System.setProperty("https.protocols", "SSLv3");
+
+ URL service = new URL("https://localhost:" + PORT);
+ HttpsURLConnection connection = (HttpsURLConnection) service.openConnection();
+
+ connection.setHostnameVerifier(new DisableCNCheckVerifier());
+
+ SSLContext sslContext = SSLContext.getInstance("SSL");
+ URL keystore = SSLv3Test.class.getResource("../../../../../keys/Truststore.jks");
+ TrustManager[] trustManagers =
+ SSLUtils.getTrustStoreManagers(false, "jks", keystore.getPath(),
+ "PKIX", LogUtils.getL7dLogger(SSLv3Test.class));
+ sslContext.init(null, trustManagers, new java.security.SecureRandom());
+
+ connection.setSSLSocketFactory(sslContext.getSocketFactory());
+
+ try {
+ connection.connect();
+ fail("Failure expected on an SSLv3 connection attempt");
+ } catch (IOException ex) {
+ // expected
+ }
+
+ System.clearProperty("https.protocols");
+
+ bus.shutdown(true);
+ }
+
+ @org.junit.Test
+ public void testSSLv3ServerAllowed() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = SSLv3Test.class.getResource("sslv3-client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ System.setProperty("https.protocols", "SSLv3");
+
+ URL service = new URL("https://localhost:" + PORT2);
+ HttpsURLConnection connection = (HttpsURLConnection) service.openConnection();
+
+ connection.setHostnameVerifier(new DisableCNCheckVerifier());
+
+ SSLContext sslContext = SSLContext.getInstance("SSL");
+ URL keystore = SSLv3Test.class.getResource("../../../../../keys/Truststore.jks");
+ TrustManager[] trustManagers =
+ SSLUtils.getTrustStoreManagers(false, "jks", keystore.getPath(),
+ "PKIX", LogUtils.getL7dLogger(SSLv3Test.class));
+ sslContext.init(null, trustManagers, new java.security.SecureRandom());
+
+ connection.setSSLSocketFactory(sslContext.getSocketFactory());
+
+ connection.connect();
+
+ connection.disconnect();
+
+ System.clearProperty("https.protocols");
+
+ bus.shutdown(true);
+ }
+
+ @org.junit.Test
+ public void testClientSSL3NotAllowed() throws Exception {
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = SSLv3Test.class.getResource("sslv3-client.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);
+
+ BindingProvider provider = (BindingProvider)port;
+ provider.getRequestContext().put("use.async.http.conduit", Boolean.FALSE);
+
+ updateAddressPort(port, PORT3);
+
+ try {
+ port.greetMe("Kitty");
+ fail("Failure expected on the client not supporting SSLv3 by default");
+ } catch (Exception ex) {
+ // expected
+ }
+
+ ((java.io.Closeable)port).close();
+ bus.shutdown(true);
+ }
+
+ @org.junit.Test
+ public void testClientSSL3Allowed() throws Exception {
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = SSLv3Test.class.getResource("sslv3-client-allow.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);
+
+ BindingProvider provider = (BindingProvider)port;
+ provider.getRequestContext().put("use.async.http.conduit", Boolean.FALSE);
+
+ updateAddressPort(port, PORT3);
+
+ assertEquals(port.greetMe("Kitty"), "Hello Kitty");
+
+ ((java.io.Closeable)port).close();
+ bus.shutdown(true);
+ }
+
+ private static final class DisableCNCheckVerifier implements HostnameVerifier {
+
+ @Override
+ public boolean verify(String arg0, SSLSession arg1) {
+ return true;
+ }
+
+ };
+}
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/transports/src/test/resources/logging.properties
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/resources/logging.properties b/systests/transports/src/test/resources/logging.properties
new file mode 100644
index 0000000..b2e5a79
--- /dev/null
+++ b/systests/transports/src/test/resources/logging.properties
@@ -0,0 +1,74 @@
+#
+#
+# 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.
+#
+#
+############################################################
+# Default Logging Configuration File
+#
+# You can use a different file by specifying a filename
+# with the java.util.logging.config.file system property.
+# For example java -Djava.util.logging.config.file=myfile
+############################################################
+
+############################################################
+# Global properties
+############################################################
+
+# "handlers" specifies a comma separated list of log Handler
+# classes. These handlers will be installed during VM startup.
+# Note that these classes must be on the system classpath.
+# By default we only configure a ConsoleHandler, which will only
+# show messages at the INFO and above levels.
+#handlers= java.util.logging.ConsoleHandler
+
+# To also add the FileHandler, use the following line instead.
+#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
+
+# Default global logging level.
+# This specifies which kinds of events are logged across
+# all loggers. For any given facility this global level
+# can be overriden by a facility specific level
+# Note that the ConsoleHandler also has a separate level
+# setting to limit messages printed to the console.
+.level= INFO
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = %h/java%u.log
+java.util.logging.FileHandler.limit = 50000
+java.util.logging.FileHandler.count = 1
+java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
+
+# Limit the message that are printed on the console to INFO and above.
+java.util.logging.ConsoleHandler.level = INFO
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+# For example, set the com.xyz.foo logger to only log SEVERE
+# messages:
+#com.xyz.foo.level = SEVERE
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-client-allow.xml
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-client-allow.xml b/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-client-allow.xml
new file mode 100644
index 0000000..aff363c
--- /dev/null
+++ b/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-client-allow.xml
@@ -0,0 +1,34 @@
+<?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>
+ <p:policies/>
+ <cxf:logging/>
+ </cxf:features>
+ </cxf:bus>
+ <http:conduit name="https://localhost:.*">
+ <http:tlsClientParameters disableCNCheck="true" secureSocketProtocol="SSLv3">
+ <sec:trustManagers>
+ <sec:keyStore type="jks" password="password" resource="keys/Truststore.jks"/>
+ </sec:trustManagers>
+ </http:tlsClientParameters>
+ </http:conduit>
+</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-client.xml
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-client.xml b/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-client.xml
new file mode 100644
index 0000000..00400cf
--- /dev/null
+++ b/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-client.xml
@@ -0,0 +1,33 @@
+<?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">
+ <sec:trustManagers>
+ <sec:keyStore type="jks" password="password" resource="keys/Truststore.jks"/>
+ </sec:trustManagers>
+ </http:tlsClientParameters>
+ </http:conduit>
+</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-server.xml
----------------------------------------------------------------------
diff --git a/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-server.xml b/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-server.xml
new file mode 100644
index 0000000..e9f8f36
--- /dev/null
+++ b/systests/transports/src/test/resources/org/apache/cxf/systest/https/sslv3-server.xml
@@ -0,0 +1,100 @@
+<?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:jaxws="http://cxf.apache.org/jaxws" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:cxf="http://cxf.apache.org/core" xmlns:p="http://cxf.apache.org/policy" 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/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apa
che.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd ">
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+ <cxf:bus>
+ <cxf:features>
+ <cxf:logging/>
+ </cxf:features>
+ </cxf:bus>
+
+ <httpj:engine-factory id="default-tls-settings">
+ <httpj:engine port="${testutil.ports.SSLv3Server}">
+ <httpj:tlsServerParameters>
+ <sec:keyManagers keyPassword="password">
+ <sec:keyStore type="jks" password="password" resource="keys/Bethal.jks"/>
+ </sec:keyManagers>
+ <sec:trustManagers>
+ <sec:keyStore type="jks" password="password" resource="keys/Truststore.jks"/>
+ </sec:trustManagers>
+ <sec:clientAuthentication want="true" required="false"/>
+ </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="SSLv3NotAllowedByDefaultEndpoint"
+ implementor="org.apache.cxf.systest.http.GreeterImpl"
+ address="https://localhost:${testutil.ports.SSLv3Server}/SoapContext/HttpsPort"
+ serviceName="s:SOAPService"
+ endpointName="e:HttpsPort" depends-on="default-tls-settings"/>
+
+ <httpj:engine-factory id="allow-sslv3-settings">
+ <httpj:engine port="${testutil.ports.SSLv3Server.2}">
+ <httpj:tlsServerParameters secureSocketProtocol="SSLv3" >
+ <sec:keyManagers keyPassword="password">
+ <sec:keyStore type="jks" password="password" resource="keys/Bethal.jks"/>
+ </sec:keyManagers>
+ <sec:trustManagers>
+ <sec:keyStore type="jks" password="password" resource="keys/Truststore.jks"/>
+ </sec:trustManagers>
+ <sec:clientAuthentication want="true" required="false"/>
+ </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="SSLv3AllowedByDefaultEndpoint"
+ implementor="org.apache.cxf.systest.http.GreeterImpl"
+ address="https://localhost:${testutil.ports.SSLv3Server.2}/SoapContext/HttpsPort"
+ serviceName="s:SOAPService"
+ endpointName="e:HttpsPort" depends-on="allow-sslv3-settings"/>
+
+ <httpj:engine-factory id="disallow-tls-via-configuration">
+ <httpj:engine port="${testutil.ports.SSLv3Server.3}">
+ <httpj:tlsServerParameters>
+ <sec:keyManagers keyPassword="password">
+ <sec:keyStore type="jks" password="password" resource="keys/Bethal.jks"/>
+ </sec:keyManagers>
+ <sec:trustManagers>
+ <sec:keyStore type="jks" password="password" resource="keys/Truststore.jks"/>
+ </sec:trustManagers>
+ <sec:clientAuthentication want="true" required="false"/>
+ <sec:excludeProtocols>
+ <sec:excludeProtocol>TLS</sec:excludeProtocol>
+ <sec:excludeProtocol>TLSv1</sec:excludeProtocol>
+ <sec:excludeProtocol>TLSv1.1</sec:excludeProtocol>
+ <sec:excludeProtocol>TLSv1.2</sec:excludeProtocol>
+ </sec:excludeProtocols>
+ </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="TLSNotAllowedByEndpoint"
+ implementor="org.apache.cxf.systest.http.GreeterImpl"
+ address="https://localhost:${testutil.ports.SSLv3Server.3}/SoapContext/HttpsPort"
+ serviceName="s:SOAPService"
+ endpointName="e:HttpsPort" depends-on="disallow-tls-via-configuration"/>
+
+</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ssl/SSLTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ssl/SSLTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ssl/SSLTest.java
deleted file mode 100644
index 6c3478e..0000000
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ssl/SSLTest.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.cxf.systest.ws.ssl;
-
-import java.io.IOException;
-import java.net.URL;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.TrustManager;
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.configuration.jsse.SSLUtils;
-import org.apache.cxf.systest.ws.common.SecurityTestUtil;
-import org.apache.cxf.systest.ws.common.UTPasswordCallback;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-import org.apache.cxf.ws.security.SecurityConstants;
-import org.example.contract.doubleit.DoubleItPortType;
-import org.junit.BeforeClass;
-
-/**
- * A set of tests SSL protocol support.
- */
-public class SSLTest extends AbstractBusClientServerTestBase {
- static final String PORT = allocatePort(Server.class);
- static final String PORT2 = allocatePort(Server.class, 2);
- static final String PORT3 = allocatePort(Server.class, 3);
-
- private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
- private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
-
- @BeforeClass
- public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
- );
- }
-
- public static void cleanup() throws Exception {
- SecurityTestUtil.cleanup();
- stopAllServers();
- }
-
- @org.junit.Test
- public void testSSLv3NotAllowed() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SSLTest.class.getResource("client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- SpringBusFactory.setDefaultBus(bus);
- SpringBusFactory.setThreadDefaultBus(bus);
-
- System.setProperty("https.protocols", "SSLv3");
-
- URL service = new URL("https://localhost:" + PORT);
- HttpsURLConnection connection = (HttpsURLConnection) service.openConnection();
-
- connection.setHostnameVerifier(new DisableCNCheckVerifier());
-
- SSLContext sslContext = SSLContext.getInstance("SSL");
- URL keystore = SSLTest.class.getResource("../security/Truststore.jks");
- TrustManager[] trustManagers =
- SSLUtils.getTrustStoreManagers(false, "jks", keystore.getPath(),
- "PKIX", LogUtils.getL7dLogger(SSLTest.class));
- sslContext.init(null, trustManagers, new java.security.SecureRandom());
-
- connection.setSSLSocketFactory(sslContext.getSocketFactory());
-
- try {
- connection.connect();
- fail("Failure expected on an SSLv3 connection attempt");
- } catch (IOException ex) {
- // expected
- }
-
- System.clearProperty("https.protocols");
-
- bus.shutdown(true);
- }
-
- @org.junit.Test
- public void testSSLv3Allowed() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SSLTest.class.getResource("client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- SpringBusFactory.setDefaultBus(bus);
- SpringBusFactory.setThreadDefaultBus(bus);
-
- System.setProperty("https.protocols", "SSLv3");
-
- URL service = new URL("https://localhost:" + PORT2);
- HttpsURLConnection connection = (HttpsURLConnection) service.openConnection();
-
- connection.setHostnameVerifier(new DisableCNCheckVerifier());
-
- SSLContext sslContext = SSLContext.getInstance("SSL");
- URL keystore = SSLTest.class.getResource("../security/Truststore.jks");
- TrustManager[] trustManagers =
- SSLUtils.getTrustStoreManagers(false, "jks", keystore.getPath(),
- "PKIX", LogUtils.getL7dLogger(SSLTest.class));
- sslContext.init(null, trustManagers, new java.security.SecureRandom());
-
- connection.setSSLSocketFactory(sslContext.getSocketFactory());
-
- connection.connect();
-
- connection.disconnect();
-
- System.clearProperty("https.protocols");
-
- bus.shutdown(true);
- }
-
- @org.junit.Test
- public void testClientSSL3NotAllowed() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SSLTest.class.getResource("client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- SpringBusFactory.setDefaultBus(bus);
- SpringBusFactory.setThreadDefaultBus(bus);
-
- URL wsdl = SSLTest.class.getResource("DoubleItSSL.wsdl");
- Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE, "DoubleItPlaintextPort3");
- DoubleItPortType utPort =
- service.getPort(portQName, DoubleItPortType.class);
- updateAddressPort(utPort, PORT3);
-
- ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "Alice");
- ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER,
- new UTPasswordCallback());
-
- try {
- utPort.doubleIt(25);
- fail("Failure expected on the client not supporting SSLv3 by default");
- } catch (Exception ex) {
- // expected
- }
-
- ((java.io.Closeable)utPort).close();
- bus.shutdown(true);
- }
-
- @org.junit.Test
- public void testClientSSL3Allowed() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SSLTest.class.getResource("client-ssl3.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- SpringBusFactory.setDefaultBus(bus);
- SpringBusFactory.setThreadDefaultBus(bus);
-
- URL wsdl = SSLTest.class.getResource("DoubleItSSL.wsdl");
- Service service = Service.create(wsdl, SERVICE_QNAME);
- QName portQName = new QName(NAMESPACE, "DoubleItPlaintextPort3");
- DoubleItPortType utPort =
- service.getPort(portQName, DoubleItPortType.class);
- updateAddressPort(utPort, PORT3);
-
- ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.USERNAME, "Alice");
- ((BindingProvider)utPort).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER,
- new UTPasswordCallback());
-
- utPort.doubleIt(25);
-
- ((java.io.Closeable)utPort).close();
- bus.shutdown(true);
- }
-
- private static final class DisableCNCheckVerifier implements HostnameVerifier {
-
- @Override
- public boolean verify(String arg0, SSLSession arg1) {
- return true;
- }
-
- };
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ssl/Server.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ssl/Server.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ssl/Server.java
deleted file mode 100644
index ce169c3..0000000
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ssl/Server.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * 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.
- */
-
-package org.apache.cxf.systest.ws.ssl;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("server.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/DoubleItSSL.wsdl
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/DoubleItSSL.wsdl b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/DoubleItSSL.wsdl
deleted file mode 100644
index ad391b1..0000000
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/DoubleItSSL.wsdl
+++ /dev/null
@@ -1,112 +0,0 @@
-<?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.
--->
-<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.org/contract/DoubleIt" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsaws="http://www.w3.org/2005/08/addressing" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:sp13="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200802" name="DoubleIt" targetNamespace="http://www.example.org/contract/DoubleIt">
- <wsdl:import location="src/test/resources/DoubleItLogical.wsdl" namespace="http://www.example.org/contract/DoubleIt"/>
- <wsdl:binding name="DoubleItPlaintextBinding" type="tns:DoubleItPortType">
- <wsp:PolicyReference URI="#DoubleItPlaintextPolicy"/>
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="DoubleIt">
- <soap:operation soapAction=""/>
- <wsdl:input>
- <soap:body use="literal"/>
- <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy"/>
- </wsdl:input>
- <wsdl:output>
- <soap:body use="literal"/>
- <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy"/>
- </wsdl:output>
- <wsdl:fault name="DoubleItFault">
- <soap:body use="literal" name="DoubleItFault"/>
- </wsdl:fault>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="DoubleItService">
- <wsdl:port name="DoubleItPlaintextPort" binding="tns:DoubleItPlaintextBinding">
- <soap:address location="https://localhost:9009/DoubleItUTPlaintext"/>
- </wsdl:port>
- <wsdl:port name="DoubleItPlaintextPort2" binding="tns:DoubleItPlaintextBinding">
- <soap:address location="https://localhost:9009/DoubleItUTPlaintext2"/>
- </wsdl:port>
- <wsdl:port name="DoubleItPlaintextPort3" binding="tns:DoubleItPlaintextBinding">
- <soap:address location="https://localhost:9009/DoubleItUTPlaintext3"/>
- </wsdl:port>
- </wsdl:service>
- <wsp:Policy wsu:Id="DoubleItPlaintextPolicy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:TransportBinding>
- <wsp:Policy>
- <sp:TransportToken>
- <wsp:Policy>
- <sp:HttpsToken>
- <wsp:Policy/>
- </sp:HttpsToken>
- </wsp:Policy>
- </sp:TransportToken>
- <sp:Layout>
- <wsp:Policy>
- <sp:Lax/>
- </wsp:Policy>
- </sp:Layout>
- <sp:IncludeTimestamp/>
- <sp:AlgorithmSuite>
- <wsp:Policy>
- <sp:Basic128/>
- </wsp:Policy>
- </sp:AlgorithmSuite>
- </wsp:Policy>
- </sp:TransportBinding>
- <sp:SupportingTokens>
- <wsp:Policy>
- <sp:UsernameToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
- <wsp:Policy>
- <sp:WssUsernameToken10/>
- </wsp:Policy>
- </sp:UsernameToken>
- </wsp:Policy>
- </sp:SupportingTokens>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
- <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Input_Policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:EncryptedParts>
- <sp:Body/>
- </sp:EncryptedParts>
- <sp:SignedParts>
- <sp:Body/>
- </sp:SignedParts>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
- <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Output_Policy">
- <wsp:ExactlyOne>
- <wsp:All>
- <sp:EncryptedParts>
- <sp:Body/>
- </sp:EncryptedParts>
- <sp:SignedParts>
- <sp:Body/>
- </sp:SignedParts>
- </wsp:All>
- </wsp:ExactlyOne>
- </wsp:Policy>
-</wsdl:definitions>
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/client-ssl3.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/client-ssl3.xml b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/client-ssl3.xml
deleted file mode 100644
index ac89427..0000000
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/client-ssl3.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?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>
- <p:policies/>
- <cxf:logging/>
- </cxf:features>
- </cxf:bus>
- <http:conduit name="https://localhost:.*">
- <http:tlsClientParameters disableCNCheck="true" secureSocketProtocol="SSLv3">
- <sec:trustManagers>
- <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Truststore.jks"/>
- </sec:trustManagers>
- </http:tlsClientParameters>
- </http:conduit>
-</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/client.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/client.xml b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/client.xml
deleted file mode 100644
index d6bbe97..0000000
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/client.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?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>
- <p:policies/>
- <cxf:logging/>
- </cxf:features>
- </cxf:bus>
- <http:conduit name="https://localhost:.*">
- <http:tlsClientParameters disableCNCheck="true">
- <sec:trustManagers>
- <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Truststore.jks"/>
- </sec:trustManagers>
- </http:tlsClientParameters>
- </http:conduit>
-</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/d2d1acbb/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/server.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/server.xml b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/server.xml
deleted file mode 100644
index 93adf5b..0000000
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/ssl/server.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?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:jaxws="http://cxf.apache.org/jaxws" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:cxf="http://cxf.apache.org/core" xmlns:p="http://cxf.apache.org/policy" 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/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apa
che.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd ">
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- <cxf:bus>
- <cxf:features>
- <p:policies/>
- <cxf:logging/>
- </cxf:features>
- </cxf:bus>
-
- <httpj:engine-factory id="default-tls-settings">
- <httpj:engine port="${testutil.ports.Server}">
- <httpj:tlsServerParameters>
- <sec:keyManagers keyPassword="password">
- <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Bethal.jks"/>
- </sec:keyManagers>
- <sec:trustManagers>
- <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Truststore.jks"/>
- </sec:trustManagers>
- <sec:clientAuthentication want="true" required="false"/>
- </httpj:tlsServerParameters>
- </httpj:engine>
- </httpj:engine-factory>
-
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="Plaintext" address="https://localhost:${testutil.ports.Server}/DoubleItUTPlaintext" serviceName="s:DoubleItService" endpointName="s:DoubleItPlaintextPort" implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl" wsdlLocation="org/apache/cxf/systest/ws/ssl/DoubleItSSL.wsdl" depends-on="default-tls-settings">
- <jaxws:properties>
- <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
- </jaxws:properties>
- </jaxws:endpoint>
-
- <httpj:engine-factory id="allow-sslv3-settings">
- <httpj:engine port="${testutil.ports.Server.2}">
- <httpj:tlsServerParameters secureSocketProtocol="SSLv3" >
- <sec:keyManagers keyPassword="password">
- <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Bethal.jks"/>
- </sec:keyManagers>
- <sec:trustManagers>
- <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Truststore.jks"/>
- </sec:trustManagers>
- <sec:clientAuthentication want="true" required="false"/>
- </httpj:tlsServerParameters>
- </httpj:engine>
- </httpj:engine-factory>
-
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="Plaintext2" address="https://localhost:${testutil.ports.Server.2}/DoubleItUTPlaintext2" serviceName="s:DoubleItService" endpointName="s:DoubleItPlaintextPort2" implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl" wsdlLocation="org/apache/cxf/systest/ws/ssl/DoubleItSSL.wsdl" depends-on="allow-sslv3-settings">
- <jaxws:properties>
- <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
- </jaxws:properties>
- </jaxws:endpoint>
-
- <httpj:engine-factory id="disallow-tls-via-configuration">
- <httpj:engine port="${testutil.ports.Server.3}">
- <httpj:tlsServerParameters>
- <sec:keyManagers keyPassword="password">
- <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Bethal.jks"/>
- </sec:keyManagers>
- <sec:trustManagers>
- <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Truststore.jks"/>
- </sec:trustManagers>
- <sec:clientAuthentication want="true" required="false"/>
- <sec:excludeProtocols>
- <sec:excludeProtocol>TLS</sec:excludeProtocol>
- <sec:excludeProtocol>TLSv1</sec:excludeProtocol>
- <sec:excludeProtocol>TLSv1.1</sec:excludeProtocol>
- <sec:excludeProtocol>TLSv1.2</sec:excludeProtocol>
- </sec:excludeProtocols>
- </httpj:tlsServerParameters>
- </httpj:engine>
- </httpj:engine-factory>
-
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="Plaintext3" address="https://localhost:${testutil.ports.Server.3}/DoubleItUTPlaintext3" serviceName="s:DoubleItService" endpointName="s:DoubleItPlaintextPort3" implementor="org.apache.cxf.systest.ws.common.DoubleItPortTypeImpl" wsdlLocation="org/apache/cxf/systest/ws/ssl/DoubleItSSL.wsdl" depends-on="disallow-tls-via-configuration">
- <jaxws:properties>
- <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
- </jaxws:properties>
- </jaxws:endpoint>
-
-</beans>