diff options
author | Simon Rettberg | 2015-08-18 19:49:30 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-08-18 19:49:30 +0200 |
commit | 6e1b0f5a5da9bb8f73ff62166d09647d9d479ad8 (patch) | |
tree | 2b8dd3e12f96f2dbd5df8fa7caa1e8c34af06745 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java | |
parent | [client] Remove old unused class (diff) | |
download | tutor-module-6e1b0f5a5da9bb8f73ff62166d09647d9d479ad8.tar.gz tutor-module-6e1b0f5a5da9bb8f73ff62166d09647d9d479ad8.tar.xz tutor-module-6e1b0f5a5da9bb8f73ff62166d09647d9d479ad8.zip |
[client] Use TLS to talk to master and satellite
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java index 36b59eed..56a0607c 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LoginWindow.java @@ -32,6 +32,7 @@ import org.openslx.dozmod.authentication.EcpAuthenticator; import org.openslx.dozmod.authentication.ShibbolethEcp; import org.openslx.dozmod.authentication.ShibbolethEcp.ReturnCode; import org.openslx.dozmod.authentication.TestAccountAuthenticator; +import org.openslx.dozmod.gui.GraphicalCertHandler; import org.openslx.dozmod.gui.Gui; import org.openslx.dozmod.gui.MainWindow; import org.openslx.dozmod.gui.helper.MessageType; @@ -333,7 +334,8 @@ public class LoginWindow extends LoginWindowLayout { // TODO: Show satellite selection if > 1 //String satAddress = data.satellites.get(0).addressList.get(0); String satAddress = "132.230.8.113"; // TODO: HACK HACK - Client client = ThriftManager.getNewSatClient(satAddress); + Client client = ThriftManager.getNewSatelliteClient(GraphicalCertHandler.getSslContext(satAddress), satAddress, + App.THRIFT_SSL_PORT, App.THRIFT_TIMEOUT_MS); if (client == null) { Gui.showMessageBox(this, "Login erfolgreich, aber der Satellit antwortet nicht", MessageType.ERROR, LOGGER, null); @@ -360,7 +362,8 @@ public class LoginWindow extends LoginWindowLayout { } if (whoami != null) { Session.initialize(whoami, satAddress, data.satelliteToken, data.masterToken); - ThriftManager.setSatelliteAddress(Session.getSatelliteAddress()); + ThriftManager.setSatelliteAddress(GraphicalCertHandler.getSslContext(Session.getSatelliteAddress()), + Session.getSatelliteAddress(), App.THRIFT_SSL_PORT, App.THRIFT_TIMEOUT_MS); // now read the config to see if the user already agreed to the disclaimer // if (DisclaimerWindow.shouldBeShown()) // VirtualizerNoticeWindow.open(); |