mirror of https://github.com/apache/poi.git
Updated TLS to v1.2 for TimeStampSimpleHttpClient
This commit is contained in:
parent
e0d446c533
commit
c47fe3c83a
|
@ -265,7 +265,7 @@ public class TimeStampSimpleHttpClient implements TimeStampHttpClient {
|
||||||
HttpsURLConnection conns = (HttpsURLConnection)conn;
|
HttpsURLConnection conns = (HttpsURLConnection)conn;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SSLContext sc = SSLContext.getInstance("TLS");
|
SSLContext sc = SSLContext.getInstance("TLSv1.2");
|
||||||
sc.init(null, new TrustManager[]{new UnsafeTrustManager()}, RandomSingleton.getInstance());
|
sc.init(null, new TrustManager[]{new UnsafeTrustManager()}, RandomSingleton.getInstance());
|
||||||
conns.setSSLSocketFactory(sc.getSocketFactory());
|
conns.setSSLSocketFactory(sc.getSocketFactory());
|
||||||
conns.setHostnameVerifier((hostname, session) -> true);
|
conns.setHostnameVerifier((hostname, session) -> true);
|
||||||
|
|
Loading…
Reference in New Issue