mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Merge remote-tracking branch 'tknoelle/develop' into tls_v1.1_and_v1.2_support
This commit is contained in:
commit
5a67c8b4fe
@ -92,6 +92,7 @@ public class AdvancedSslSocketFactory implements SecureProtocolSocketFactory {
|
||||
throws IOException, UnknownHostException {
|
||||
|
||||
Socket socket = mSslContext.getSocketFactory().createSocket(host, port, clientHost, clientPort);
|
||||
((SSLSocket) socket).setEnabledProtocols(new String[]{"TLSv1", "TLSv1.1", "TLSv1.2"});
|
||||
verifyPeerIdentity(host, port, socket);
|
||||
return socket;
|
||||
}
|
||||
@ -168,6 +169,7 @@ public class AdvancedSslSocketFactory implements SecureProtocolSocketFactory {
|
||||
SocketFactory socketfactory = mSslContext.getSocketFactory();
|
||||
Log_OC.d(TAG, " ... with connection timeout " + timeout + " and socket timeout " + params.getSoTimeout());
|
||||
Socket socket = socketfactory.createSocket();
|
||||
((SSLSocket) socket).setEnabledProtocols(new String[]{"TLSv1", "TLSv1.1", "TLSv1.2"});
|
||||
SocketAddress localaddr = new InetSocketAddress(localAddress, localPort);
|
||||
SocketAddress remoteaddr = new InetSocketAddress(host, port);
|
||||
socket.setSoTimeout(params.getSoTimeout());
|
||||
@ -185,6 +187,7 @@ public class AdvancedSslSocketFactory implements SecureProtocolSocketFactory {
|
||||
UnknownHostException {
|
||||
Log_OC.d(TAG, "Creating SSL Socket with remote " + host + ":" + port);
|
||||
Socket socket = mSslContext.getSocketFactory().createSocket(host, port);
|
||||
((SSLSocket) socket).setEnabledProtocols(new String[]{"TLSv1", "TLSv1.1", "TLSv1.2"});
|
||||
verifyPeerIdentity(host, port, socket);
|
||||
return socket;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user