Repository: qpid-jms-amqp-0-x
Updated Branches:
  refs/heads/6.3.x 1f905bb0d -> 2f6732941


QPID-8153: [Qpid JMS AMQP 0-x] Pass host/port through to the SSLEngine so that 
SNI may function

(cherry picked from commit 78cf85c60fbedddfc08f978262aaa23061cae2b4)


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/commit/2f673294
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/tree/2f673294
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/diff/2f673294

Branch: refs/heads/6.3.x
Commit: 2f6732941cc1c5f677cb4384f29e8e2880a6f3c0
Parents: 1f905bb
Author: Keith Wall <kw...@apache.org>
Authored: Thu Apr 5 15:21:28 2018 +0100
Committer: Alex Rudyy <oru...@apache.org>
Committed: Mon Apr 16 14:29:57 2018 +0100

----------------------------------------------------------------------
 .../network/security/SecurityLayerFactory.java          | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms-amqp-0-x/blob/2f673294/client/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java
----------------------------------------------------------------------
diff --git 
a/client/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java
 
b/client/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java
index 7239c5a..0522936 100644
--- 
a/client/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java
+++ 
b/client/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java
@@ -29,6 +29,7 @@ import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLEngine;
 import javax.net.ssl.TrustManager;
 
+import org.apache.qpid.client.BrokerDetails;
 import org.apache.qpid.configuration.CommonProperties;
 import org.apache.qpid.ssl.SSLContextFactory;
 import org.apache.qpid.transport.ByteBufferSender;
@@ -122,7 +123,16 @@ public class SecurityLayerFactory
                     
CommonProperties.QPID_SECURITY_TLS_CIPHER_SUITE_BLACK_LIST_DEFAULT);
             try
             {
-                _engine = sslCtx.createSSLEngine();
+                if (BrokerDetails.SOCKET.equals(settings.getTransport())
+                                                || settings.getHost() == null
+                                                || settings.getHost().length() 
== 0)
+                {
+                    _engine = sslCtx.createSSLEngine();
+                }
+                else
+                {
+                    _engine = sslCtx.createSSLEngine(settings.getHost(), 
settings.getPort());
+                }
                 _engine.setUseClientMode(true);
                 SSLUtil.updateEnabledTlsProtocols(_engine, protocolWhiteList, 
protocolBlackList);
                 SSLUtil.updateEnabledCipherSuites(_engine, 
cipherSuiteWhiteList, cipherSuiteBlackList);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to