Use XMPP service name when creating the TLS socket

instead of the hostname. This should make SNI also to use the XMPP
service name instead of the hostname.

Fixes SMACK-813.
This commit is contained in:
Florian Schmaus 2018-04-09 08:18:13 +02:00
parent 14d20367b2
commit b5bc7d8d9f
1 changed files with 1 additions and 1 deletions

View File

@ -795,7 +795,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
Socket plain = socket;
// Secure the plain connection
socket = context.getSocketFactory().createSocket(plain,
host, plain.getPort(), true);
config.getXMPPServiceDomain().toString(), plain.getPort(), true);
final SSLSocket sslSocket = (SSLSocket) socket;
// Immediately set the enabled SSL protocols and ciphers. See SMACK-712 why this is