Commit 8de85d0d authored by Matyáš Latner's avatar Matyáš Latner

#5 QoSServer SSL connection

parent 1a6b6a74
...@@ -22,6 +22,9 @@ dependencies { ...@@ -22,6 +22,9 @@ dependencies {
jar { jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
from('src/') {
include 'at/alladin/rmbt/qos/testserver/crt/qosserver.jks'
}
manifest { attributes 'Main-Class': 'at.alladin.rmbt.qos.testserver.TestServer' } manifest { attributes 'Main-Class': 'at.alladin.rmbt.qos.testserver.TestServer' }
} }
......
...@@ -41,6 +41,9 @@ import java.util.concurrent.ExecutorService; ...@@ -41,6 +41,9 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.io.PrintWriter;
import java.io.StringWriter;
import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLServerSocket; import javax.net.ssl.SSLServerSocket;
...@@ -238,11 +241,13 @@ public class TestServer { ...@@ -238,11 +241,13 @@ public class TestServer {
shutdown(); shutdown();
} }
}); });
}
catch (IOException e) {
e.printStackTrace();
} }
catch (Exception e) { catch (Exception e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
TestServerConsole.log("INITIALIZATION ERROR: " + sw.toString(), 0, TestServerServiceEnum.TEST_SERVER);
e.printStackTrace(); e.printStackTrace();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment