From f925fe4304673db63d981cd6fa67b624d5edf7fb Mon Sep 17 00:00:00 2001 From: gulraizmalhi Date: Mon, 27 Feb 2017 21:51:11 +0500 Subject: [PATCH] The SSLContext shouldn't be configured as default application wide. --- src/main/java/com/indix/tools/SSLTrustCA.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/indix/tools/SSLTrustCA.java b/src/main/java/com/indix/tools/SSLTrustCA.java index 180f3e0..f6a9956 100644 --- a/src/main/java/com/indix/tools/SSLTrustCA.java +++ b/src/main/java/com/indix/tools/SSLTrustCA.java @@ -67,7 +67,6 @@ private synchronized static SSLContext trustCa(URL caFile) { tmf.init(keyStore); SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(null, tmf.getTrustManagers(), null); - SSLContext.setDefault(sslContext); return sslContext; } catch (Exception ex) { throw new RuntimeException(ex);