mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-25 13:57:58 +01:00
Use host(name) to construct the SSLSocket
in XMPPTCPConnection. So that the hostname and not the IP is available to the SSLSocket and the SSLSession, which handed over to HostnameVerifier. This leaves the HostnameVerifier with the - name of the XMPP service (first argument of verify(String, SSLSession) - name of the used host (found in the SSLSession) allowing more complex verification mechanisms performed by the HostnameVerifier.
This commit is contained in:
parent
887c6114b7
commit
5f4374ec26
1 changed files with 1 additions and 1 deletions
|
@ -721,7 +721,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
Socket plain = socket;
|
||||
// Secure the plain connection
|
||||
socket = context.getSocketFactory().createSocket(plain,
|
||||
plain.getInetAddress().getHostAddress(), plain.getPort(), true);
|
||||
host, plain.getPort(), true);
|
||||
// Initialize the reader and writer with the new secured version
|
||||
initReaderAndWriter();
|
||||
|
||||
|
|
Loading…
Reference in a new issue