summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'dozentenmodulserver/src/main/java')
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/App.java11
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/util/Configuration.java4
2 files changed, 10 insertions, 5 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();
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/util/Configuration.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/util/Configuration.java
index b9652a0c..c8208338 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/util/Configuration.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/util/Configuration.java
@@ -40,7 +40,9 @@ public class Configuration {
dbUsername = prop.getProperty("db.username");
dbPassword = prop.getProperty("db.password");
masterAddress = prop.getProperty("master.address");
- masterSsl = Boolean.getBoolean(prop.getProperty("master.ssl"));
+ if (!Util.isEmptyString(prop.getProperty("master.ssl"))) {
+ masterSsl = Boolean.getBoolean(prop.getProperty("master.ssl"));
+ }
try {
masterPort = Integer.parseInt(prop.getProperty("master.port"));
} catch (Exception e) {