Commit 2cb29d2d authored by Andre Freyssinet's avatar Andre Freyssinet

Test the use of client authentication configuration (JORAM-368).

parent 606835a5
...@@ -52,10 +52,27 @@ public class Test extends TestCase { ...@@ -52,10 +52,27 @@ public class Test extends TestCase {
public void run() { public void run() {
try { try {
System.out.println("server start"); System.out.println("server start");
startAgentServer((short) 0);
String serverks = System.getProperty("server.ks", "joram_ks");
String serverpass = System.getProperty("server.pass", "jorampass");
String clientauth = System.getProperty("client.auth", "NEED");
startAgentServer((short) 0,
new String[] {"-Dorg.objectweb.joram.clientAuth=" + clientauth,
"-Dorg.objectweb.joram.keystore=" + serverks,
"-Dorg.objectweb.joram.keystorepass=" + serverpass});
Thread.sleep(1000); Thread.sleep(1000);
// Joram client and server use the same property names, so we have to overload these
// properties prior to create the Connection.
String clientks = System.getProperty("client.ks");
if (clientks != null)
System.setProperty("org.objectweb.joram.keystore", clientks);
String clientpass = System.getProperty("client.pass");
if (clientpass != null)
System.setProperty("org.objectweb.joram.keystorepass", clientpass);
System.out.println("ks=" + clientks + ", pass=" + clientpass);
admin(); admin();
System.out.println("admin config ok"); System.out.println("admin config ok");
...@@ -99,7 +116,7 @@ public class Test extends TestCase { ...@@ -99,7 +116,7 @@ public class Test extends TestCase {
public void admin() throws Exception { public void admin() throws Exception {
AdminModule.connect("root", "root", 60, "org.objectweb.joram.client.jms.tcp.ReliableSSLTcpClient"); AdminModule.connect("root", "root", 30, "org.objectweb.joram.client.jms.tcp.ReliableSSLTcpClient");
Queue queue = Queue.create("queue"); Queue queue = Queue.create("queue");
Topic topic = Topic.create("topic"); Topic topic = Topic.create("topic");
......
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