File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/main/java/net/imagej/updater/util Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 88import java .io .IOException ;
99import java .net .HttpURLConnection ;
1010import java .net .ProtocolException ;
11+ import java .net .SocketException ;
1112import java .net .SocketTimeoutException ;
1213import java .net .URL ;
1314import java .net .UnknownHostException ;
@@ -56,6 +57,12 @@ public static void checkHTTPSSupport(LogService log) {
5657 "Please contact your system administrator to enable communication via HTTPS." ;
5758 if (log != null ) log .warn (msg );
5859 else System .out .println ("[WARNING] " + msg );
60+ } catch (SocketException e ) {
61+ secureMode = false ;
62+ String msg = "SocketException while trying to update securely via HTTPS. Will fall back to HTTP. This is a security risk. " +
63+ "Try downloading a new version of this software. If you're behind a proxy, call Edit > Options > Proxy Settings." ;
64+ if (log != null ) log .warn (msg );
65+ else System .out .println ("[WARNING] " + msg );
5966 } catch (IOException e ) {
6067 e .printStackTrace ();
6168 }
You can’t perform that action at this time.
0 commit comments