Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id ECDC9200C47 for ; Thu, 30 Mar 2017 11:21:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EB58B160B78; Thu, 30 Mar 2017 09:21:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3D2D0160B8B for ; Thu, 30 Mar 2017 11:21:45 +0200 (CEST) Received: (qmail 21205 invoked by uid 500); 30 Mar 2017 09:21:44 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 21030 invoked by uid 99); 30 Mar 2017 09:21:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Mar 2017 09:21:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EDFACDFBDA; Thu, 30 Mar 2017 09:21:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Date: Thu, 30 Mar 2017 09:21:44 -0000 Message-Id: <20e9dba3ce7b4c6f96020283846c1fc1@git.apache.org> In-Reply-To: <179cb1af145f459f89cd7fa637947bd4@git.apache.org> References: <179cb1af145f459f89cd7fa637947bd4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/3] cxf git commit: Fixing merge archived-at: Thu, 30 Mar 2017 09:21:46 -0000 Fixing merge Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/398a4988 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/398a4988 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/398a4988 Branch: refs/heads/3.1.x-fixes Commit: 398a4988ba004fc484c54376758122f7eec4d980 Parents: 71b22ea Author: Colm O hEigeartaigh Authored: Thu Mar 30 10:21:35 2017 +0100 Committer: Colm O hEigeartaigh Committed: Thu Mar 30 10:21:35 2017 +0100 ---------------------------------------------------------------------- .../systest/https/trust/TrustManagerTest.java | 70 -------------------- 1 file changed, 70 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/398a4988/systests/transports/src/test/java/org/apache/cxf/systest/https/trust/TrustManagerTest.java ---------------------------------------------------------------------- diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/https/trust/TrustManagerTest.java b/systests/transports/src/test/java/org/apache/cxf/systest/https/trust/TrustManagerTest.java index 89e6b89..b89b1f5 100644 --- a/systests/transports/src/test/java/org/apache/cxf/systest/https/trust/TrustManagerTest.java +++ b/systests/transports/src/test/java/org/apache/cxf/systest/https/trust/TrustManagerTest.java @@ -43,13 +43,8 @@ import org.junit.BeforeClass; */ public class TrustManagerTest extends AbstractBusClientServerTestBase { static final String PORT = allocatePort(TrustServer.class); -<<<<<<< HEAD - -======= - static final String PORT2 = allocatePort(TrustServer.class, 2); static final String PORT3 = allocatePort(TrustServer.class, 3); ->>>>>>> 16163d8... Adding Jetty programmatic tests @BeforeClass public static void startServers() throws Exception { assertTrue( @@ -143,9 +138,6 @@ public class TrustManagerTest extends AbstractBusClientServerTestBase { ((java.io.Closeable)port).close(); bus.shutdown(true); } -<<<<<<< HEAD - -======= // Here the Trust Manager checks the server cert. this time we are invoking on the // service that is configured in code (not by spring) @@ -186,7 +178,6 @@ public class TrustManagerTest extends AbstractBusClientServerTestBase { bus.shutdown(true); } ->>>>>>> 16163d8... Adding Jetty programmatic tests @org.junit.Test public void testInvalidServerCertX509TrustManager() throws Exception { SpringBusFactory bf = new SpringBusFactory(); @@ -224,72 +215,11 @@ public class TrustManagerTest extends AbstractBusClientServerTestBase { } catch (Exception ex) { // expected } -<<<<<<< HEAD - -======= ((java.io.Closeable)port).close(); bus.shutdown(true); } - @org.junit.Test - public void testOSCPOverride() throws Exception { - SpringBusFactory bf = new SpringBusFactory(); - URL busFile = TrustManagerTest.class.getResource("client-trust.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, PORT2); - - // Read truststore - KeyStore ts = KeyStore.getInstance("JKS"); - try (InputStream trustStore = - ClassLoaderUtils.getResourceAsStream("keys/cxfca.jks", TrustManagerTest.class)) { - ts.load(trustStore, "password".toCharArray()); - } - - try { - Security.setProperty("ocsp.enable", "true"); - - PKIXBuilderParameters param = new PKIXBuilderParameters(ts, new X509CertSelector()); - param.setRevocationEnabled(true); - - TrustManagerFactory tmf = - TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - tmf.init(new CertPathTrustManagerParameters(param)); - - TLSClientParameters tlsParams = new TLSClientParameters(); - tlsParams.setTrustManagers(tmf.getTrustManagers()); - tlsParams.setDisableCNCheck(true); - - Client client = ClientProxy.getClient(port); - HTTPConduit http = (HTTPConduit) client.getConduit(); - http.setTlsClientParameters(tlsParams); - - try { - port.greetMe("Kitty"); - fail("Failure expected on an invalid OCSP responder URL"); - } catch (Exception ex) { - // expected - } - - } finally { - Security.setProperty("ocsp.enable", "false"); - } - ->>>>>>> 16163d8... Adding Jetty programmatic tests - ((java.io.Closeable)port).close(); - bus.shutdown(true); - } - public static class NoOpX509TrustManager implements X509TrustManager { public NoOpX509TrustManager() {