mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1457996 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4cbfbbb10c
commit
1d9b347157
|
@ -16,10 +16,13 @@
|
|||
*/
|
||||
package org.apache.activemq.bugs;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.Socket;
|
||||
|
||||
import javax.net.SocketFactory;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.apache.activemq.broker.BrokerFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
import org.apache.activemq.transport.stomp.Stomp;
|
||||
|
@ -29,16 +32,12 @@ import org.junit.After;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.net.SocketFactory;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
|
||||
public class AMQ4133Test {
|
||||
|
||||
protected String java_security_auth_login_config = "java.security.auth.login.config";
|
||||
protected String xbean = "xbean:";
|
||||
protected String confBase = "src/test/resources/org/apache/activemq/bugs/amq4126";
|
||||
protected String certBase = "src/test/resources/org/apache/activemq/security";
|
||||
protected String sep = File.separator;
|
||||
protected String activemqXml = "InconsistentConnectorPropertiesBehaviour.xml";
|
||||
protected BrokerService broker;
|
||||
|
||||
|
@ -49,8 +48,8 @@ public class AMQ4133Test {
|
|||
if (System.getProperty(java_security_auth_login_config) != null) {
|
||||
oldLoginConf = System.getProperty(java_security_auth_login_config);
|
||||
}
|
||||
System.setProperty(java_security_auth_login_config, confBase + sep + "login.config");
|
||||
broker = BrokerFactory.createBroker(xbean + confBase + sep + activemqXml);
|
||||
System.setProperty(java_security_auth_login_config, confBase + "/" + "login.config");
|
||||
broker = BrokerFactory.createBroker(xbean + confBase + "/" + activemqXml);
|
||||
|
||||
broker.start();
|
||||
broker.waitUntilStarted();
|
||||
|
@ -85,10 +84,10 @@ public class AMQ4133Test {
|
|||
}
|
||||
|
||||
public Socket createSocket(String host, int port) throws Exception {
|
||||
System.setProperty("javax.net.ssl.trustStore", certBase + sep + "broker1.ks");
|
||||
System.setProperty("javax.net.ssl.trustStore", certBase + "/" + "broker1.ks");
|
||||
System.setProperty("javax.net.ssl.trustStorePassword", "password");
|
||||
System.setProperty("javax.net.ssl.trustStoreType", "jks");
|
||||
System.setProperty("javax.net.ssl.keyStore", certBase + sep + "client.ks");
|
||||
System.setProperty("javax.net.ssl.keyStore", certBase + "/" + "client.ks");
|
||||
System.setProperty("javax.net.ssl.keyStorePassword", "password");
|
||||
System.setProperty("javax.net.ssl.keyStoreType", "jks");
|
||||
|
||||
|
|
Loading…
Reference in New Issue