From c47fe3c83afa8718326a2a64fac290bb18c2413a Mon Sep 17 00:00:00 2001 From: db Date: Thu, 1 Feb 2024 13:15:10 +0100 Subject: [PATCH] Updated TLS to v1.2 for TimeStampSimpleHttpClient --- .../poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java index f112f48d98e..ec311d18fdc 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java @@ -265,7 +265,7 @@ protected void recklessConnection(HttpURLConnection conn) throws IOException { HttpsURLConnection conns = (HttpsURLConnection)conn; try { - SSLContext sc = SSLContext.getInstance("TLS"); + SSLContext sc = SSLContext.getInstance("TLSv1.2"); sc.init(null, new TrustManager[]{new UnsafeTrustManager()}, RandomSingleton.getInstance()); conns.setSSLSocketFactory(sc.getSocketFactory()); conns.setHostnameVerifier((hostname, session) -> true);