From 98ca5833130788326518288289cb12037a784055 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Wed, 6 Feb 2019 11:12:53 -0600 Subject: [PATCH] ARTEMIS-2248 don't create sslEngine w/sniHost in NettyConnector --- .../artemis/core/remoting/impl/netty/NettyConnector.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java index 3467f1bb02..fa0682e2a3 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java @@ -649,8 +649,8 @@ public class NettyConnector extends AbstractConnector { SSLEngine engine = Subject.doAs(subject, new PrivilegedExceptionAction() { @Override public SSLEngine run() { - if (verifyHost) { - return context.createSSLEngine(sniHost != null ? sniHost : host, port); + if (host != null && port != -1) { + return context.createSSLEngine(host, port); } else { return context.createSSLEngine(); } @@ -690,8 +690,8 @@ public class NettyConnector extends AbstractConnector { SSLEngine engine = Subject.doAs(subject, new PrivilegedExceptionAction() { @Override public SSLEngine run() { - if (verifyHost) { - return context.newEngine(alloc, sniHost != null ? sniHost : host, port); + if (host != null && port != -1) { + return context.newEngine(alloc, host, port); } else { return context.newEngine(alloc); }