summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2009-01-13 17:29:30 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2009-01-13 17:29:30 +0000
commitf87af0c1050cd56aa40da669e97e16a41fab180a (patch)
tree0b8c23ddd305ff2560fd9365fcba28e67f0e4c7b
parent697522a2cabd5e0e1fd78081c35db2c9992d9d4c (diff)
downloadqpid-python-f87af0c1050cd56aa40da669e97e16a41fab180a.tar.gz
This is related to QPID-1572.
The SSL test profile runs the java client against the C++ broker using SSL connections git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/M4-RCs@734192 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/cpp.ssl.testprofile12
-rw-r--r--qpid/java/module.xml3
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java9
-rw-r--r--qpid/java/test-provider.properties1
-rw-r--r--qpid/java/test_resources/certstore.jksbin0 -> 573 bytes
-rw-r--r--qpid/java/test_resources/keystore.jksbin0 -> 2362 bytes
-rw-r--r--qpid/java/test_resources/pfile1
-rw-r--r--qpid/java/test_resources/server_db/cert8.dbbin0 -> 65536 bytes
-rw-r--r--qpid/java/test_resources/server_db/key3.dbbin0 -> 16384 bytes
-rw-r--r--qpid/java/test_resources/server_db/secmod.dbbin0 -> 16384 bytes
-rw-r--r--qpid/java/test_resources/server_db/server.crt13
-rw-r--r--qpid/java/test_resources/server_db/server.req21
12 files changed, 59 insertions, 1 deletions
diff --git a/qpid/java/cpp.ssl.testprofile b/qpid/java/cpp.ssl.testprofile
new file mode 100644
index 0000000000..974e10baac
--- /dev/null
+++ b/qpid/java/cpp.ssl.testprofile
@@ -0,0 +1,12 @@
+broker.version=0-10
+broker=${project.root}/../cpp/src/qpidd -p @PORT --load-module ${project.root}/../cpp/src/.libs/ssl.so --ssl-cert-password-file ${project.root}/test_resources/ssl/pfile --ssl-cert-db ${project.root}/test_resources/ssl/server_db/ --ssl-require-client-authentication --data-dir ${build.data}/@PORT -t --auth no
+test.excludesfile=${project.root}/ExcludeList ${project.root}/010ExcludeList
+test.excludeslist=org.apache.qpid.test.client.failover.FailoverTest#*
+profile.use_ssl=true
+broker.ready= Listening for SSL connections
+
+javax.net.ssl.keyStore=${project.root}/test_resources/ssl/keystore.jks
+javax.net.ssl.keyStorePassword=password
+javax.net.ssl.trustStore=${project.root}/test_resources/ssl/certstore.jks
+javax.net.ssl.trustStorePassword=password
+
diff --git a/qpid/java/module.xml b/qpid/java/module.xml
index a9bd9a2b2a..455e87988c 100644
--- a/qpid/java/module.xml
+++ b/qpid/java/module.xml
@@ -244,6 +244,9 @@
<syspropertyset>
<propertyref prefix="profile"/>
</syspropertyset>
+ <syspropertyset>
+ <propertyref prefix="javax.net.ssl"/>
+ </syspropertyset>
<sysproperty key="max_prefetch" value ="${max_prefetch}"/>
<sysproperty key="example.plugin.target" value="${project.root}/build/lib/plugins"/>
<sysproperty key="QPID_EXAMPLE_HOME" value="${project.root}/build"/>
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
index 085578c13d..d0bb265a0c 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
@@ -518,7 +518,14 @@ public class QpidTestCase extends TestCase
_logger.info("get ConnectionFactory");
if (_connectionFactory == null)
{
- _connectionFactory = getConnectionFactory("default");
+ if (Boolean.getBoolean("profile.use_ssl"))
+ {
+ _connectionFactory = getConnectionFactory("ssl");
+ }
+ else
+ {
+ _connectionFactory = getConnectionFactory("default");
+ }
}
return _connectionFactory;
}
diff --git a/qpid/java/test-provider.properties b/qpid/java/test-provider.properties
index 7c9622630c..8066256f4f 100644
--- a/qpid/java/test-provider.properties
+++ b/qpid/java/test-provider.properties
@@ -21,6 +21,7 @@
connectionfactory.default = amqp://username:password@clientid/test?brokerlist='tcp://localhost:5672'
connectionfactory.default.vm = amqp://username:password@clientid/test?brokerlist='vm://:1'
+connectionfactory.ssl = amqp://username:password@clientid/test?brokerlist='tcp://localhost:5671?ssl='true''
connectionfactory.failover = amqp://username:password@clientid/test?brokerlist='tcp://localhost:5673;tcp://localhost:5672'
connectionfactory.failover.vm = amqp://username:password@clientid/test?brokerlist='vm://:2;vm://:1'
diff --git a/qpid/java/test_resources/certstore.jks b/qpid/java/test_resources/certstore.jks
new file mode 100644
index 0000000000..69dd1d252b
--- /dev/null
+++ b/qpid/java/test_resources/certstore.jks
Binary files differ
diff --git a/qpid/java/test_resources/keystore.jks b/qpid/java/test_resources/keystore.jks
new file mode 100644
index 0000000000..ef2df733d6
--- /dev/null
+++ b/qpid/java/test_resources/keystore.jks
Binary files differ
diff --git a/qpid/java/test_resources/pfile b/qpid/java/test_resources/pfile
new file mode 100644
index 0000000000..f3097ab130
--- /dev/null
+++ b/qpid/java/test_resources/pfile
@@ -0,0 +1 @@
+password
diff --git a/qpid/java/test_resources/server_db/cert8.db b/qpid/java/test_resources/server_db/cert8.db
new file mode 100644
index 0000000000..db6c7b7d79
--- /dev/null
+++ b/qpid/java/test_resources/server_db/cert8.db
Binary files differ
diff --git a/qpid/java/test_resources/server_db/key3.db b/qpid/java/test_resources/server_db/key3.db
new file mode 100644
index 0000000000..f53328c39b
--- /dev/null
+++ b/qpid/java/test_resources/server_db/key3.db
Binary files differ
diff --git a/qpid/java/test_resources/server_db/secmod.db b/qpid/java/test_resources/server_db/secmod.db
new file mode 100644
index 0000000000..4ea614d2f5
--- /dev/null
+++ b/qpid/java/test_resources/server_db/secmod.db
Binary files differ
diff --git a/qpid/java/test_resources/server_db/server.crt b/qpid/java/test_resources/server_db/server.crt
new file mode 100644
index 0000000000..24faa82328
--- /dev/null
+++ b/qpid/java/test_resources/server_db/server.crt
@@ -0,0 +1,13 @@
+-----BEGIN CERTIFICATE-----
+MIICBjCCAW+gAwIBAgIFAItAexIwDQYJKoZIhvcNAQEEBQAwODELMAkGA1UEBhMC
+Q0ExCzAJBgNVBAgTAk9OMQswCQYDVQQKEwJSSDEPMA0GA1UEAxMGUm9vdENBMB4X
+DTA4MTAyNDE4MjExMVoXDTA5MDEyNDE4MjExMVowRzELMAkGA1UEBhMCQ0ExCzAJ
+BgNVBAgTAk9OMQswCQYDVQQKEwJSSDEeMBwGA1UEAxMVbG9jYWxob3N0LmxvY2Fs
+ZG9tYWluMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClh0DtKzSgDVjtJHdm
+GQPiMOWG2IIob3L9rK53GTz4VwN+y44WmBGGIp3dOXwwXPdKzCf7+d6DzaCnYozz
+izBtj68EDhynOWGfHXRYvY7K7rKBnpKucPAe3JmNlQqj/OPurHA0KCoF1BIkJ0mv
+7/9u5foPbssrzGHq7iBLB2P7rQIDAQABow0wCzAJBgNVHRMEAjAAMA0GCSqGSIb3
+DQEBBAUAA4GBADmVLjHDo0Uu4/jmfzDHrpPlNokWrHiIe4DtrBXoVQMeZXzlgclQ
+CZxEj6Gr9kxP3wiT81KBsTyXpMrQBQidqBDaQRbsx+qhL7ZZHwwBZbuKKyp9OGe9
+JjPTjqlECI0SdCAd0CUWwZonCPl2LCKIYbpUFCSvsYXWCsmIPzzMPMHd
+-----END CERTIFICATE-----
diff --git a/qpid/java/test_resources/server_db/server.req b/qpid/java/test_resources/server_db/server.req
new file mode 100644
index 0000000000..bc938580e8
--- /dev/null
+++ b/qpid/java/test_resources/server_db/server.req
@@ -0,0 +1,21 @@
+
+Certificate request generated by Netscape certutil
+Phone: (not specified)
+
+Common Name: localhost.localdomain
+Email: (not specified)
+Organization: RH
+State: ON
+Country: CA
+
+-----BEGIN NEW CERTIFICATE REQUEST-----
+MIIBhjCB8AIBADBHMQswCQYDVQQGEwJDQTELMAkGA1UECBMCT04xCzAJBgNVBAoT
+AlJIMR4wHAYDVQQDExVsb2NhbGhvc3QubG9jYWxkb21haW4wgZ8wDQYJKoZIhvcN
+AQEBBQADgY0AMIGJAoGBAKWHQO0rNKANWO0kd2YZA+Iw5YbYgihvcv2srncZPPhX
+A37LjhaYEYYind05fDBc90rMJ/v53oPNoKdijPOLMG2PrwQOHKc5YZ8ddFi9jsru
+soGekq5w8B7cmY2VCqP84+6scDQoKgXUEiQnSa/v/27l+g9uyyvMYeruIEsHY/ut
+AgMBAAGgADANBgkqhkiG9w0BAQQFAAOBgQACXXouY4nsGeMjj0Yp7rmUedBz98e5
+ShlpJWb9T4uH2qrzFyHwPvAGJEFsZE7gKmImwncSJid8ViQLgxzKJuTBqJIRH2kY
+qIVcK3lPxjvWj8he+JXxKORezhNbLHlBhLGGNZjnjv8kk15jFduevQeKsHMUN3KP
+EcJCs+NR7szy0w==
+-----END NEW CERTIFICATE REQUEST-----