1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 16:06:08 +00:00

Apply protocol enabling to extra createSocket method after merging fix on tunneled HTTP

This commit is contained in:
David A. Velasco 2014-11-14 14:59:05 +01:00
parent d66d5047b4
commit 950a3ff8f7

View File

@ -313,6 +313,7 @@ public class AdvancedSslSocketFactory implements SecureProtocolSocketFactory {
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException,
UnknownHostException {
Socket sslSocket = mSslContext.getSocketFactory().createSocket(socket, host, port, autoClose);
((SSLSocket) sslSocket).setEnabledProtocols(new String[]{"TLSv1", "TLSv1.1", "TLSv1.2"});
verifyPeerIdentity(host, port, sslSocket);
return sslSocket;
}