mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 08:39:24 +01:00
re-added the check for https that was accidentally removed
This commit is contained in:
@@ -28,6 +28,7 @@ import java.net.PasswordAuthentication;
|
|||||||
import java.net.Proxy;
|
import java.net.Proxy;
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
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;
|
||||||
@@ -188,15 +189,17 @@ public final class URLConnectionFactory {
|
|||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param conn the connection
|
* @param conn the connection
|
||||||
*/
|
*/
|
||||||
private static void configureTLS(URL url, HttpURLConnection conn) {
|
private static void configureTLS(URL url, URLConnection conn) {
|
||||||
try {
|
if ("https".equals(url.getProtocol())) {
|
||||||
final HttpsURLConnection secCon = (HttpsURLConnection) conn;
|
try {
|
||||||
final SSLSocketFactoryEx factory = new SSLSocketFactoryEx();
|
final HttpsURLConnection secCon = (HttpsURLConnection) conn;
|
||||||
secCon.setSSLSocketFactory(factory);
|
final SSLSocketFactoryEx factory = new SSLSocketFactoryEx();
|
||||||
} catch (NoSuchAlgorithmException ex) {
|
secCon.setSSLSocketFactory(factory);
|
||||||
LOGGER.debug("Unsupported algorithm in SSLSocketFactoryEx", ex);
|
} catch (NoSuchAlgorithmException ex) {
|
||||||
} catch (KeyManagementException ex) {
|
LOGGER.debug("Unsupported algorithm in SSLSocketFactoryEx", ex);
|
||||||
LOGGER.debug("Key mnagement eception in SSLSocketFactoryEx", ex);
|
} catch (KeyManagementException ex) {
|
||||||
|
LOGGER.debug("Key mnagement eception in SSLSocketFactoryEx", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user