Skip to content

Commit

Permalink
Adding TLSv1 support for custom SSL socket factory
Browse files Browse the repository at this point in the history
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 0818f3b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0818f3b

Please sign in to comment.