[AMQ-8445] Fix SSLParameters set in the SSL transport

This commit is contained in:
Jean-Baptiste Onofré 2022-01-12 08:48:00 +01:00
parent 05426d637c
commit c2e2c818b5
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}