diff options
author | Mürsel Türk | 2020-07-08 14:53:22 +0200 |
---|---|---|
committer | Mürsel Türk | 2020-07-08 14:53:22 +0200 |
commit | c35f1e1fca3110e70dc7a5492a2a1c8e155e9a01 (patch) | |
tree | a741880b1d3cdb1269a736c52bb34a63b32c401a /dozentenmodul/src | |
parent | [client] Add resource bundle files for gui folder (diff) | |
download | tutor-module-c35f1e1fca3110e70dc7a5492a2a1c8e155e9a01.tar.gz tutor-module-c35f1e1fca3110e70dc7a5492a2a1c8e155e9a01.tar.xz tutor-module-c35f1e1fca3110e70dc7a5492a2a1c8e155e9a01.zip |
[client] Update GraphicalCertHandler
Added the updated version of GraphicalCertHandler class that was
missing from the last commit.
Diffstat (limited to 'dozentenmodul/src')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/GraphicalCertHandler.java | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/GraphicalCertHandler.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/GraphicalCertHandler.java index 99c03373..50f14edc 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/GraphicalCertHandler.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/GraphicalCertHandler.java @@ -15,6 +15,7 @@ import javax.net.ssl.X509TrustManager; import org.apache.log4j.Logger; import org.openslx.dozmod.authentication.FingerprintManager; import org.openslx.dozmod.gui.Gui.GuiCallable; +import org.openslx.dozmod.gui.helper.I18n; import org.openslx.dozmod.gui.helper.MessageType; public class GraphicalCertHandler { @@ -34,9 +35,8 @@ public class GraphicalCertHandler { @Override public Boolean run() { return Gui.showMessageBox(null, - "Der Satellit besitzt kein Zertifikat. Verschlüsselte Verbindung nicht möglich.\n\n" - + "Möchten Sie trotzdem fortfahren?", MessageType.WARNING, LOGGER, - null); + I18n.GUI.getString("GraphicalCertHandler.Message.warning.noCertificate"), + MessageType.WARNING, LOGGER, null); } }); if (ret) @@ -76,11 +76,7 @@ public class GraphicalCertHandler { return; } // Known, mismatch, panic! - question = "!!! ALARM !!!! ALARM !!!\n\n" + "Der Fingerabdruck von " + address - + " hat sich verändert.\n" + "Erwartet: " - + new BigInteger(expectedFingerprint).toString(16) + "\n" + "Vorgefunden: " - + actualFingerprintReadable + "\n\n" - + "Möchten Sie trotzdem zu diesem Satelliten verbinden?"; + question = I18n.GUI.getString("GraphicalCertHandler.Message.yesNo.fingerprintChanged"); } // Some question needs to be asked Boolean userOk = Gui.syncExec(new GuiCallable<Boolean>() { @@ -112,13 +108,16 @@ public class GraphicalCertHandler { try { ctx = SSLContext.getInstance("TLSv1.2"); } catch (NoSuchAlgorithmException e) { - Gui.asyncMessageBox("Could not get TLSv1.2 SSL context", MessageType.ERROR, LOGGER, e); + Gui.asyncMessageBox(I18n.GUI.getString("GraphicalCertHandler.Message.error.couldNotGetSSLContext"), + MessageType.ERROR, LOGGER, e); } if (ctx != null) { try { ctx.init(null, new TrustManager[] { new GuiTrustManager() }, null); } catch (KeyManagementException e) { - Gui.asyncMessageBox("Could not initialize TLSv1.2 SSL context", MessageType.ERROR, LOGGER, e); + Gui.asyncMessageBox( + I18n.GUI.getString("GraphicalCertHandler.Message.error.couldNotInitializeSSLContext"), + MessageType.ERROR, LOGGER, e); ctx = null; } } |