This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/main by this push:
new c2e2c81 [AMQ-8445] Fix SSLParameters set in the SSL transport
new 0585a29 Merge pull request #744 from jbonofre/AMQ-8445
c2e2c81 is described below
commit c2e2c818b529ee45ff244564ea52206b81eaf783
Author: Jean-Baptiste Onofré <[email protected]>
AuthorDate: Wed Jan 12 08:48:00 2022 +0100
[AMQ-8445] Fix SSLParameters set in the SSL transport
---
.../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);
}