summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java
diff options
context:
space:
mode:
authorSimon Rettberg2015-09-10 11:38:25 +0200
committerSimon Rettberg2015-09-10 11:38:25 +0200
commit4ef812cdb8cb7eb294dba5837cad750deaa52da9 (patch)
treed9c355fb3b2360d54c4d63c6784908eb38bc6e6b /dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java
parent[server] Make xml compatible with legacy run-virt (diff)
downloadtutor-module-4ef812cdb8cb7eb294dba5837cad750deaa52da9.tar.gz
tutor-module-4ef812cdb8cb7eb294dba5837cad750deaa52da9.tar.xz
tutor-module-4ef812cdb8cb7eb294dba5837cad750deaa52da9.zip
[*] Improve SSL handling
Diffstat (limited to 'dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java')
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java
index 425a3384..2648310b 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java
@@ -1,6 +1,7 @@
package org.openslx.bwlp.sat;
import java.io.IOException;
+import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.sql.SQLException;
import java.util.Date;
@@ -44,7 +45,8 @@ public class App {
private static final Set<String> failFastMethods = new HashSet<>();
- public static void main(String[] args) throws TTransportException, NoSuchAlgorithmException, IOException {
+ public static void main(String[] args) throws TTransportException, NoSuchAlgorithmException, IOException,
+ KeyManagementException {
//get going and show basic information in log file
BasicConfigurator.configure();
if (args.length != 0 && args[0].equals("debug")) {
@@ -94,10 +96,11 @@ public class App {
SSLContext ctx = null;
if (Configuration.getMasterServerSsl()) {
- ctx = SSLContext.getDefault();
+ ctx = SSLContext.getInstance("TLSv1.2");
+ ctx.init(null, null, null);
}
- ThriftManager.setMasterServerAddress(ctx, // TODO: Use the TLSv1.2 one once the master is ready
- Configuration.getMasterServerAddress(), Configuration.getMasterServerPort(), 30000);
+ ThriftManager.setMasterServerAddress(ctx, Configuration.getMasterServerAddress(),
+ Configuration.getMasterServerPort(), 30000);
// Load useful things from master server
OrganizationList.get();