This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch activemq-5.16.x
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/activemq-5.16.x by this push:
new e52b1bd [AMQ-8445] Fix SSLParameters set in the SSL transport
e52b1bd is described below
commit e52b1bd0ede200007c66ada57dd17775d0b3589d
Author: Jean-Baptiste Onofré <[email protected]>
AuthorDate: Wed Jan 12 08:48:00 2022 +0100
[AMQ-8445] Fix SSLParameters set in the SSL transport
(cherry picked from commit c2e2c818b529ee45ff244564ea52206b81eaf783)
---
.../main/java/org/apache/activemq/transport/tcp/SslTransport.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/SslTransport.java
b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/SslTransport.java
index 6e24558..770c3aa 100644
---
a/activemq-client/src/main/java/org/apache/activemq/transport/tcp/SslTransport.java
+++
b/activemq-client/src/main/java/org/apache/activemq/transport/tcp/SslTransport.java
@@ -129,7 +129,11 @@ public class SslTransport extends TcpTransport {
sslParams.setEndpointIdentificationAlgorithm("HTTPS");
}
- ((SSLSocket)this.socket).setSSLParameters(sslParams);
+ if (remoteLocation != null || verifyHostName) {
+ // AMQ-8445 only set SSLParameters if it has been populated before
+ ((SSLSocket) this.socket).setSSLParameters(sslParams);
+ }
+
super.initialiseSocket(sock);
}