Last active
March 7, 2019 01:19
-
-
Save pollux-/85feb52264eb9d380ddbd3545ce2e050 to your computer and use it in GitHub Desktop.
Force the connection to use only TLS v.1.2 avoiding the fallback to older version to avoid vulnerabilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Force the connection to use only TLS v.1.2 avoiding the fallback to older version to avoid vulnerabilities | |
* | |
*/ | |
final ConnectionSpec.Builder connectionSpec = | |
new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS); | |
connectionSpec.tlsVersions(TlsVersion.TLS_1_2).build(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment