mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 03:52:06 +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;
|
Socket plain = socket;
|
||||||
// Secure the plain connection
|
// Secure the plain connection
|
||||||
socket = context.getSocketFactory().createSocket(plain,
|
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
|
// Initialize the reader and writer with the new secured version
|
||||||
initReaderAndWriter();
|
initReaderAndWriter();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue