[Schmitzm-commits] r2402 - trunk/schmitzm-core/src/main/java/de/schmitzm/io

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Sat May 24 13:22:01 CEST 2014


Author: mojays
Date: 2014-05-24 13:22:01 +0200 (Sat, 24 May 2014)
New Revision: 2402

Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java
Log:
IOUtil: new TRUST_ALL_HOSTNAME_VERIFIER; ignoring hostname verify during determineUrlFileSize(..)

Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java	2014-05-19 16:56:07 UTC (rev 2401)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java	2014-05-24 11:22:01 UTC (rev 2402)
@@ -1118,6 +1118,8 @@
               final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
               // Reset SSL socket factory to ignore SSL certificates
               ((HttpsURLConnection)connection).setSSLSocketFactory(sslSocketFactory);
+              // Install the all-trusting hostname verifier
+              ((HttpsURLConnection)connection).setHostnameVerifier(TRUST_ALL_HOSTNAME_VERIFIER);
               LOGGER.warn("SSL connecion established ignoring any certificate!");
             } catch (Exception e) {
               throw new IOException(e);



More information about the Schmitzm-commits mailing list