Skip to content

Commit

Permalink
Avoid modification of https.protocols
Browse files Browse the repository at this point in the history
This disables TLSv1.3 and changes global state that shouldn't be changed.

Fixes eirslett#1170.
  • Loading branch information
kelunik authored Jan 13, 2025
1 parent 640d6f0 commit 4d8c7e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 2 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ install:
- cmd: SET M2_HOME=C:\maven\apache-maven-%MAVEN_VERSION%
# Prepend Java entry, remove Ruby entry (C:\Ruby193\bin;) from PATH
- cmd: SET PATH=%M2_HOME%\bin;%JAVA_HOME%\bin;%PATH:C:\Ruby193\bin;=%;
# Required to avoid errors with JDK 8 because TSL 1.0 & 1.1 support was removed
- cmd: SET MAVEN_OPTS=-Xmx2g -Dhttps.protocols=TLSv1.2
- cmd: SET MAVEN_OPTS=-Xmx2g
- cmd: SET JAVA_OPTS=-Xmx2g
- cmd: mvn --version
- cmd: java -version
build_script:
- mvn clean package --batch-mode -DskipTest -Dhttps.protocols=TLSv1.2
- mvn clean package --batch-mode -DskipTest
test_script:
- mvn clean install --batch-mode
cache:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ public DefaultFileDownloader(ProxyConfig proxyConfig){

@Override
public void download(String downloadUrl, String destination, String userName, String password, Map<String, String> httpHeaders) throws DownloadException {
// force tls to 1.2 since github removed weak cryptographic standards
// https://blog.github.com/2018-02-02-weak-cryptographic-standards-removal-notice/
System.setProperty("https.protocols", "TLSv1.2");
String fixedDownloadUrl = downloadUrl;
try {
fixedDownloadUrl = FilenameUtils.separatorsToUnix(fixedDownloadUrl);
Expand Down

0 comments on commit 4d8c7e7

Please sign in to comment.