This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/2.6.x by this push:
new 3c0c91d ARTEMIS-2248 don't create sslEngine w/sniHost in
NettyConnector
3c0c91d is described below
commit 3c0c91df8dcd37b05046004e5fa433cd44e23749
Author: Justin Bertram <[email protected]>
AuthorDate: Wed Feb 6 11:12:53 2019 -0600
ARTEMIS-2248 don't create sslEngine w/sniHost in NettyConnector
(cherry picked from commit 98ca5833130788326518288289cb12037a784055)
---
.../activemq/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 31668b3..37c1d39 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
@@ -634,8 +634,8 @@ public class NettyConnector extends AbstractConnector {
SSLEngine engine = Subject.doAs(subject, new
PrivilegedExceptionAction<SSLEngine>() {
@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();
}
@@ -665,8 +665,8 @@ public class NettyConnector extends AbstractConnector {
SSLEngine engine = Subject.doAs(subject, new
PrivilegedExceptionAction<SSLEngine>() {
@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);
}