Skip to content

Commit

Permalink
Merge pull request #1372 from dhis2/tls-1.2
Browse files Browse the repository at this point in the history
fix: [TLS-1.2] Set tls 1.2 in ssl context instance
  • Loading branch information
vgarciabnz authored Sep 18, 2020
2 parents 6a16f66 + 738a2ed commit 815e25e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static void setTLSParameters(OkHttpClient.Builder client) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
try {

SSLContext sc = SSLContext.getInstance("TLS" /*"TLSv1.2"*/);
SSLContext sc = SSLContext.getInstance(TlsVersion.TLS_1_2.javaName());
sc.init(null, null, null);

TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(
Expand Down

0 comments on commit 815e25e

Please sign in to comment.