use ascii notation for punycode domains in SNI
This commit is contained in:
parent
b76b60df5c
commit
b6d62c13ef
|
@ -823,7 +823,7 @@ public class XmppConnection implements Runnable {
|
||||||
final InetAddress address = socket.getInetAddress();
|
final InetAddress address = socket.getInetAddress();
|
||||||
final SSLSocket sslSocket = (SSLSocket) tlsFactoryVerifier.factory.createSocket(socket, address.getHostAddress(), socket.getPort(), true);
|
final SSLSocket sslSocket = (SSLSocket) tlsFactoryVerifier.factory.createSocket(socket, address.getHostAddress(), socket.getPort(), true);
|
||||||
SSLSocketHelper.setSecurity(sslSocket);
|
SSLSocketHelper.setSecurity(sslSocket);
|
||||||
SSLSocketHelper.setHostname(sslSocket, account.getServer());
|
SSLSocketHelper.setHostname(sslSocket, IDN.toASCII(account.getServer()));
|
||||||
SSLSocketHelper.setApplicationProtocol(sslSocket, "xmpp-client");
|
SSLSocketHelper.setApplicationProtocol(sslSocket, "xmpp-client");
|
||||||
if (!tlsFactoryVerifier.verifier.verify(account.getServer(), this.verifiedHostname, sslSocket.getSession())) {
|
if (!tlsFactoryVerifier.verifier.verify(account.getServer(), this.verifiedHostname, sslSocket.getSession())) {
|
||||||
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": TLS certificate verification failed");
|
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": TLS certificate verification failed");
|
||||||
|
|
Loading…
Reference in New Issue