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/05/24 08:15:23 UTC

[camel] 03/04: 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 fbac749fccb0e548af998402642ab4bd529c2b2f
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 0891248..86b4845 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
@@ -626,7 +626,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);
@@ -655,7 +656,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()));
         }