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

(cherry picked from commit c2e2c818b5)
This commit is contained in:
Jean-Baptiste Onofré 2022-01-12 08:48:00 +01:00
parent 6a25d654f2
commit e52b1bd0ed
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);
}