You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by co...@apache.org on 2019/06/11 08:31:45 UTC

[camel] 03/06: Fixing camel-ahc errors with Jetty upgrade

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch CAMEL-13563
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 6f9f1eb76026957e2fb6558533e15c784d872341
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu May 23 17:48:53 2019 +0100

    Fixing camel-ahc errors with Jetty upgrade
---
 .../java/org/apache/camel/component/jetty/JettyHttpComponent.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
index 4dc9348..b251411 100644
--- a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
+++ b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
@@ -601,7 +601,8 @@ public abstract class JettyHttpComponent extends HttpCommonComponent implements
                 throw new RuntimeCamelException(e);
             }
         } else if ("https".equals(endpoint.getProtocol())) {
-            sslcf = new SslContextFactory.Server();
+            sslcf = new SslContextFactory();
+            sslcf.setEndpointIdentificationAlgorithm(null);
             String keystoreProperty = System.getProperty(JETTY_SSL_KEYSTORE);
             if (keystoreProperty != null) {
                 sslcf.setKeyStorePath(keystoreProperty);
@@ -630,7 +631,10 @@ public abstract class JettyHttpComponent extends HttpCommonComponent implements
     protected abstract AbstractConnector createConnectorJettyInternal(Server server, JettyHttpEndpoint endpoint, SslContextFactory sslcf);
 
     private SslContextFactory createSslContextFactory(SSLContextParameters ssl, boolean client) throws GeneralSecurityException, IOException {
-        SslContextFactory answer = client ? new SslContextFactory.Client() : new SslContextFactory.Server();
+        SslContextFactory answer = new SslContextFactory();
+        if (!client) {
+            answer.setEndpointIdentificationAlgorithm(null);
+        }
         if (ssl != null) {
             answer.setSslContext(ssl.createSSLContext(getCamelContext()));
         }