Permalink
Browse files

Adding TLSv1 support for custom SSL socket factory

Summary:
This problem tries to solve issue #14244

Implemented a fetch request to a TLSv1 server. It now successfully resolves TLS handshake.
Tested same fetch to TLSv1.2 server and still successfully resolves TLS handshake.
Closes #14245

Differential Revision: D5898689

Pulled By: shergin

fbshipit-source-id: 8766ebe6909443367651ab868aa5ff62747cd906
  • Loading branch information...
PaulVanStaden authored and facebook-github-bot committed Sep 24, 2017
1 parent 9bf936c commit 0818f3bdf5890ce66b6b82b22bb53ba2976cda9f
@@ -71,7 +71,7 @@ public Socket createSocket(InetAddress address, int port, InetAddress localAddre
private Socket enableTLSOnSocket(Socket socket) {
if(socket != null && (socket instanceof SSLSocket)) {
((SSLSocket)socket).setEnabledProtocols(new String[] {"TLSv1.1", "TLSv1.2"});
((SSLSocket)socket).setEnabledProtocols(new String[] {"TLSv1", "TLSv1.1", "TLSv1.2"});
}
return socket;
}

0 comments on commit 0818f3b

Please sign in to comment.