Updated HTTPS downloader to work with older Java versions#1
Merged
ftadel merged 3 commits intobrainstorm-tools:masterfrom Aug 22, 2018
Merged
Updated HTTPS downloader to work with older Java versions#1ftadel merged 3 commits intobrainstorm-tools:masterfrom
ftadel merged 3 commits intobrainstorm-tools:masterfrom
Conversation
Member
|
If you think this is OK, go ahead. Let me know when I should recompile it and update it in the Brainstorm distribution. |
Member
Author
|
OK I fixed a HUGE slowdown in download speeds, there was a lot of overhead in the I/O saving operation. Now updates are much faster to download and work from Matlab 2008 upwards (legacy Java is painful...) Ready to merge on my end! |
Member
|
I tested it on Matlab 2018a and 2008a (Win10). Pushed to the main distribution here: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When I started integrating downloads from GitHub repositories in Brainstorm, I ran into the problem of the fact that GitHub forces downloads through a TLS 1.2 connection, which is only supported by Java 1.7+. So I disabled HTTPS downloads for older Java versions.
Now that NeuroImage.usc.edu is under HTTPS as well, this is obviously an issue for most other downloads as well under Java 1.6. I therefore implemented a non-TLS connection for non-GitHub Java 1.6 HTTPS downloads. I however ran into another problem of very old versions of Java 1.6.0 (which ships with Matlab 2008a and probably others) rejecting NeuroImage's SSL certificate... So I went with the proposed solution here and added a "trust all certificates" option to our SSL download connection for Java 1.6.
This is obviously completely insecure but I think as long as we're in control of what URLs are added in the public Brainstorm repo it shouldn't be an issue (also keep in mind that this is only for old supported Matlab versions with Java 1.6).
In my early tests it's working fine for our oldest and newest supported Matlab and Java versions. If you're fine with the solution I'll go ahead and do more extensive tests.