• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

FinalCrypt - The No¹ One-Time Pad Encryption


Commit MetaInfo

Revisión44a31bc0875b76438f591bee3ded145eabc17f0b (tree)
Tiempo2020-07-08 04:14:22
Autorron <ronuitzaandam@gmai...>
Commiterron

Log Message

Date: 2020-07-07 Version: 6.3.9

Added 3 Sec HTTP Timeout to speedup HTTP(S) connect
This also improves all other HTTP Connect Responses
General, Support, Update, Download or Share Webpage
This fixes FinalCrypt's unresponsiveness at startup
when the webservers of the hosting are unresponsive

Cambiar Resumen

Diferencia incremental

--- a/src/rdj/GUIFX.java
+++ b/src/rdj/GUIFX.java
@@ -1791,65 +1791,47 @@ public class GUIFX extends Application implements UI, Initializable
17911791
17921792 private void checkUpdate(boolean userActivated)
17931793 {
1794-// Platform.runLater(() ->
1795-// {
1796- Thread pleaseShareThread = new Thread(new Runnable()
1797- {
1798- @Override
1799- @SuppressWarnings({"static-access"})
1800- public void run()
1801- {
1802- Platform.runLater(() ->
1803- {
1804- version = new Version(ui);
1805- version.checkCurrentlyInstalledVersion(GUIFX.this);
1806- version.checkLatestOnlineVersion(GUIFX.this);
1807- prefs.putLong("Update Checked", now); flushPrefs(prefs);
1808- String[] lines = version.getUpdateStatus().split("\r\n");
1809- for (String line: lines) { log(line + "\r\n", true, true, true, false, false); }
1810-
1811- // Just for testing purposes (uncomment)
1812- // alertCurrentVersionIsUp2Date();
1813- // alertCurrentVersionCanBeUpdated();
1814- // alertCurrentVersionIsDevelopement();
1815- // alertlatestVersionUnknown();
1816- // latestAlertMessage();
1817- //// currentAlertMessage(); // Should never be tested and used in production
1818-
1819- if (version.latestVersionIsKnown())
1820- {
1821- if (( ! version.versionIsDifferent() ) && ( userActivated )) { alertCurrentVersionIsUp2Date(); }
1822- else { if (version.versionCanBeUpdated()) { alertCurrentVersionCanBeUpdated(); }
1823- else if ( (version.versionIsDevelopment() ) && ( userActivated ) ) { alertCurrentVersionIsDevelopement(); } }
1824- }
1825- else { alertlatestVersionUnknown(); }
1826-
1827- // After all check update processing comes an optional alert
1828- if (
1829- ( true ) // Leave to "true" to enable online alerts
1830- && ( version.getLatestAlertSubjectString() != null)
1831- && ( ! version.getLatestAlertSubjectString().isEmpty())
1832- && ( version.getLatestAlertString() != null)
1833- && ( ! version.getLatestAlertString().isEmpty())
1834- ) // Only display Alert in VERSION2 file
1835- { latestAlertMessage(); }
1836-
1837- if (
1838- ( false ) // Leave to "false" Only set to true to test an alert
1839- && ( version.getCurrentAlertSubjectString() != null)
1840- && ( ! version.getCurrentAlertSubjectString().isEmpty())
1841- && ( version.getCurrentAlertString() != null)
1842- && ( ! version.getCurrentAlertString().isEmpty())
1843- ) // Only display Alert in VERSION2 file
1844- { currentAlertMessage(); }
1845- });
1846- }
1847- });
1848- pleaseShareThread.setName("pleaseShareThread");
1849- pleaseShareThread.setDaemon(true);
1850- pleaseShareThread.start();
1851-
1852-// });
1794+ version = new Version(this);
1795+ version.checkCurrentlyInstalledVersion(GUIFX.this);
1796+ version.checkLatestOnlineVersion(GUIFX.this);
1797+ prefs.putLong("Update Checked", now); flushPrefs(prefs);
1798+ String[] lines = version.getUpdateStatus().split("\r\n");
1799+ for (String line: lines) { log(line + "\r\n", true, true, true, false, false); }
1800+
1801+ // Just for testing purposes (uncomment)
1802+ // alertCurrentVersionIsUp2Date();
1803+ // alertCurrentVersionCanBeUpdated();
1804+ // alertCurrentVersionIsDevelopement();
1805+ // alertlatestVersionUnknown();
1806+ // latestAlertMessage();
1807+ //// currentAlertMessage(); // Should never be tested and used in production
1808+
1809+ if (version.latestVersionIsKnown())
1810+ {
1811+ if (( ! version.versionIsDifferent() ) && ( userActivated )) { alertCurrentVersionIsUp2Date(); }
1812+ else { if (version.versionCanBeUpdated()) { alertCurrentVersionCanBeUpdated(); }
1813+ else if ( (version.versionIsDevelopment() ) && ( userActivated ) ) { alertCurrentVersionIsDevelopement(); } }
1814+ }
1815+ else { alertlatestVersionUnknown(); }
1816+
1817+// After all check update processing comes an optional alert
1818+ if (
1819+ ( true ) // Leave to "true" to enable online alerts
1820+ && ( version.getLatestAlertSubjectString() != null)
1821+ && ( ! version.getLatestAlertSubjectString().isEmpty())
1822+ && ( version.getLatestAlertString() != null)
1823+ && ( ! version.getLatestAlertString().isEmpty())
1824+ ) // Only display Alert in VERSION2 file
1825+ { latestAlertMessage(); }
1826+
1827+ if (
1828+ ( false ) // Leave to "false" Only set to true to test an alert
1829+ && ( version.getCurrentAlertSubjectString() != null)
1830+ && ( ! version.getCurrentAlertSubjectString().isEmpty())
1831+ && ( version.getCurrentAlertString() != null)
1832+ && ( ! version.getCurrentAlertString().isEmpty())
1833+ ) // Only display Alert in VERSION2 file
1834+ { currentAlertMessage(); }
18531835 }
18541836
18551837 private void alertCurrentVersionIsUp2Date()
--- a/src/rdj/Version.java
+++ b/src/rdj/Version.java
@@ -107,8 +107,13 @@ public class Version
107107 ,"http://www.google.com/search?q=finalcrypt+homepage&oq=finalcrypt+homepage" // tested
108108 };
109109
110+// Emulate bad server response
111+// nc -l -p 8080
112+// "http://localhost:8080/VERSION2"
113+
110114 private static final String[] REMOTEVERSIONFILEURLSTRINGARRAY = {
111115 "https://www.finalcrypt.org/VERSION2" // tested
116+// ,"http://localhost:8080/VERSION2" // tested
112117 ,"http://www.finalcrypt.org/VERSION2" // tested
113118 ,"https://www.finalcrypt.com/VERSION2" // tested
114119 ,"http://www.finalcrypt.com/VERSION2" // tested
@@ -412,7 +417,7 @@ public class Version
412417
413418 if (remoteVERSION2FileString.startsWith("https://")) { remoteContent = httpsGetRequest(ui, remoteVERSION2FileString); } else { remoteContent = httpGetRequest(ui, remoteVERSION2FileString); }
414419
415-// ui.test("\r\nNEXT\r\n");
420+// ui.test("Remote Content: " + remoteContent + "\r\n\r\n");
416421 if ((remoteContent != null) && (! checkOnlineFailed))
417422 {
418423 String[] lines = remoteContent.split("\n"); // VERSION2 file was create on linux with unix newlines \n