1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 14:22:05 +01:00

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

View file

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