mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 10:01:35 +01:00
skipped patch for Java 1.6 & 1.7 if the JRE is at least 1.8 - see issue #523
This commit is contained in:
@@ -31,6 +31,8 @@ import java.net.URL;
|
|||||||
import java.security.KeyManagementException;
|
import java.security.KeyManagementException;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import javax.net.ssl.HttpsURLConnection;
|
import javax.net.ssl.HttpsURLConnection;
|
||||||
|
import org.apache.commons.lang3.JavaVersion;
|
||||||
|
import org.apache.commons.lang3.SystemUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -189,7 +191,7 @@ public final class URLConnectionFactory {
|
|||||||
* @param conn the connection
|
* @param conn the connection
|
||||||
*/
|
*/
|
||||||
private static void configureTLS(URL url, HttpURLConnection conn) {
|
private static void configureTLS(URL url, HttpURLConnection conn) {
|
||||||
if ("https".equals(url.getProtocol())) {
|
if ("https".equals(url.getProtocol()) && !SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8)) {
|
||||||
try {
|
try {
|
||||||
final HttpsURLConnection secCon = (HttpsURLConnection) conn;
|
final HttpsURLConnection secCon = (HttpsURLConnection) conn;
|
||||||
final SSLSocketFactoryEx factory = new SSLSocketFactoryEx();
|
final SSLSocketFactoryEx factory = new SSLSocketFactoryEx();
|
||||||
|
|||||||
Reference in New Issue
Block a user