You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2012/11/28 20:07:37 UTC
svn commit: r1414870 - in /qpid/branches/0.20/qpid: ./ cpp/docs/api/
cpp/examples/old_api/tradedemo/ cpp/include/qmf/engine/ cpp/src/
cpp/src/qmf/engine/ cpp/src/qpid/acl/ cpp/src/qpid/broker/
cpp/src/qpid/management/ cpp/src/qpid/sys/windows/ cpp/src/...
Author: robbie
Date: Wed Nov 28 19:07:33 2012
New Revision: 1414870
URL: http://svn.apache.org/viewvc?rev=1414870&view=rev
Log:
QPID-4468: restore connection level ssl option to provide compatibility with older client configuration, add ability to override brokerlist ssl option
merge from trunk r1413364
Modified:
qpid/branches/0.20/qpid/ (props changed)
qpid/branches/0.20/qpid/cpp/docs/api/ (props changed)
qpid/branches/0.20/qpid/cpp/examples/old_api/tradedemo/tradedemo_topic_publisher.vcproj (props changed)
qpid/branches/0.20/qpid/cpp/include/qmf/engine/Agent.h (props changed)
qpid/branches/0.20/qpid/cpp/include/qmf/engine/Console.h (props changed)
qpid/branches/0.20/qpid/cpp/src/ (props changed)
qpid/branches/0.20/qpid/cpp/src/CMakeLists.txt (props changed)
qpid/branches/0.20/qpid/cpp/src/qmf/engine/Agent.cpp (props changed)
qpid/branches/0.20/qpid/cpp/src/qpid/acl/ (props changed)
qpid/branches/0.20/qpid/cpp/src/qpid/broker/ (props changed)
qpid/branches/0.20/qpid/cpp/src/qpid/management/ManagementAgent.cpp (props changed)
qpid/branches/0.20/qpid/cpp/src/qpid/management/ManagementAgent.h (props changed)
qpid/branches/0.20/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp (props changed)
qpid/branches/0.20/qpid/cpp/src/tests/ (props changed)
qpid/branches/0.20/qpid/cpp/src/tests/cluster_tests.py (props changed)
qpid/branches/0.20/qpid/doc/book/ (props changed)
qpid/branches/0.20/qpid/doc/book/src/java-broker/ (props changed)
qpid/branches/0.20/qpid/doc/book/src/programming/Programming-In-Apache-Qpid.xml
qpid/branches/0.20/qpid/java/ (props changed)
qpid/branches/0.20/qpid/java/amqp-1-0-client/ (props changed)
qpid/branches/0.20/qpid/java/amqp-1-0-client-jms/ (props changed)
qpid/branches/0.20/qpid/java/amqp-1-0-common/ (props changed)
qpid/branches/0.20/qpid/java/bdbstore/ (props changed)
qpid/branches/0.20/qpid/java/broker/ (props changed)
qpid/branches/0.20/qpid/java/broker-plugins/management-http/ (props changed)
qpid/branches/0.20/qpid/java/broker/bin/ (props changed)
qpid/branches/0.20/qpid/java/broker/src/ (props changed)
qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java (props changed)
qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0.java (props changed)
qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0_SASL.java (props changed)
qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/v1_0/ (props changed)
qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/ (props changed)
qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/ (props changed)
qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/jms/ConnectionURL.java
qpid/branches/0.20/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
qpid/branches/0.20/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java
qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java (props changed)
qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java (props changed)
qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java (props changed)
qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java (props changed)
qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java (props changed)
qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java (props changed)
qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java (props changed)
qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java (props changed)
qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java (props changed)
qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java (props changed)
qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java (props changed)
qpid/branches/0.20/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java
qpid/branches/0.20/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java (props changed)
qpid/branches/0.20/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java (props changed)
qpid/branches/0.20/qpid/java/test-profiles/ (props changed)
qpid/branches/0.20/qpid/java/test-profiles/CPPExcludes (props changed)
qpid/branches/0.20/qpid/java/test-profiles/Excludes (props changed)
qpid/branches/0.20/qpid/java/test-profiles/JavaBDBExcludes (props changed)
qpid/branches/0.20/qpid/java/test-profiles/JavaExcludes (props changed)
qpid/branches/0.20/qpid/java/test-profiles/JavaPre010Excludes (props changed)
qpid/branches/0.20/qpid/java/test-profiles/JavaTransientExcludes (props changed)
qpid/branches/0.20/qpid/java/test-profiles/XAExcludes (props changed)
qpid/branches/0.20/qpid/java/test-profiles/cpp.async.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/cpp.cluster.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/cpp.noprefetch.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/cpp.ssl.excludes (props changed)
qpid/branches/0.20/qpid/java/test-profiles/cpp.ssl.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/cpp.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/java-bdb.0-9-1.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/java-dby.0-9-1.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/java-mms.0-9-1.testprofile (props changed)
qpid/branches/0.20/qpid/java/test-profiles/log4j-test.xml (props changed)
qpid/branches/0.20/qpid/java/test-profiles/test-provider.properties (props changed)
qpid/branches/0.20/qpid/java/test-profiles/test_resources/ (props changed)
qpid/branches/0.20/qpid/java/test-profiles/testprofile.defaults (props changed)
qpid/branches/0.20/qpid/packaging/windows/ (props changed)
qpid/branches/0.20/qpid/packaging/windows/installer.proj (props changed)
qpid/branches/0.20/qpid/python/ (props changed)
qpid/branches/0.20/qpid/python/examples/api/spout (props changed)
qpid/branches/0.20/qpid/python/qpid/concurrency.py (props changed)
qpid/branches/0.20/qpid/tests/src/py/qpid_tests/broker_0_9/queue.py (props changed)
Propchange: qpid/branches/0.20/qpid/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/docs/api/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/docs/api:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/examples/old_api/tradedemo/tradedemo_topic_publisher.vcproj
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/examples/old_api/tradedemo/tradedemo_topic_publisher.vcproj:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/include/qmf/engine/Agent.h
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/include/qmf/engine/Agent.h:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/include/qmf/engine/Console.h
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/include/qmf/engine/Console.h:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/src/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/src/CMakeLists.txt
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/CMakeLists.txt:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/src/qmf/engine/Agent.cpp
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/qmf/engine/Agent.cpp:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/src/qpid/acl/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/qpid/acl:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/src/qpid/broker/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/qpid/broker:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/src/qpid/management/ManagementAgent.cpp
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/src/qpid/management/ManagementAgent.h
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.h:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/src/tests/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/tests:r1413364
Propchange: qpid/branches/0.20/qpid/cpp/src/tests/cluster_tests.py
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/cpp/src/tests/cluster_tests.py:r1413364
Propchange: qpid/branches/0.20/qpid/doc/book/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/doc/book:r1413364
Propchange: qpid/branches/0.20/qpid/doc/book/src/java-broker/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/doc/book/src/java-broker:r1413364
Modified: qpid/branches/0.20/qpid/doc/book/src/programming/Programming-In-Apache-Qpid.xml
URL: http://svn.apache.org/viewvc/qpid/branches/0.20/qpid/doc/book/src/programming/Programming-In-Apache-Qpid.xml?rev=1414870&r1=1414869&r2=1414870&view=diff
==============================================================================
--- qpid/branches/0.20/qpid/doc/book/src/programming/Programming-In-Apache-Qpid.xml (original)
+++ qpid/branches/0.20/qpid/doc/book/src/programming/Programming-In-Apache-Qpid.xml Wed Nov 28 19:07:33 2012
@@ -3087,6 +3087,22 @@ spout - -content "$(cat rdu.xml | sed -e
</para>
</entry>
</row>
+ <row>
+ <entry>
+ ssl
+ </entry>
+ <entry>
+ boolean
+ </entry>
+ <entry>
+ <para>
+ If <literal>ssl='true'</literal>, use SSL for all broker connections. Overrides any per-broker settings in the brokerlist (see below) entries. If not specified, the brokerlist entry for each given broker is used to determine whether SSL is used.
+ </para>
+ <para>
+ Introduced in version 0.22.
+ </para>
+ </entry>
+ </row>
</tbody>
</tgroup>
</table>
@@ -3237,6 +3253,7 @@ spout - -content "$(cat rdu.xml | sed -e
trust_store_password
</entry>
<entry>
+ --
</entry>
<entry>
Trust store password
@@ -3247,6 +3264,7 @@ spout - -content "$(cat rdu.xml | sed -e
key_store
</entry>
<entry>
+ --
</entry>
<entry>
path to key store
@@ -3271,7 +3289,9 @@ spout - -content "$(cat rdu.xml | sed -e
Boolean
</entry>
<entry>
- If <literal>ssl='true'</literal>, the JMS client will encrypt the connection using SSL.
+ <para>If <literal>ssl='true'</literal>, the JMS client will encrypt the connection to this broker using SSL.</para>
+
+ <para>This can also be set/overridden for all brokers using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para>
</entry>
</row>
<row>
@@ -3292,7 +3312,7 @@ spout - -content "$(cat rdu.xml | sed -e
ssl_cert_alias
</entry>
<entry>
-
+ --
</entry>
<entry>
If multiple certificates are present in the keystore, the alias will be used to extract the correct certificate.
Propchange: qpid/branches/0.20/qpid/java/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java:r1413364
Propchange: qpid/branches/0.20/qpid/java/amqp-1-0-client/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/amqp-1-0-client:r1413364
Propchange: qpid/branches/0.20/qpid/java/amqp-1-0-client-jms/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/amqp-1-0-client-jms:r1413364
Propchange: qpid/branches/0.20/qpid/java/amqp-1-0-common/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/amqp-1-0-common:r1413364
Propchange: qpid/branches/0.20/qpid/java/bdbstore/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/bdbstore:r1413364
Propchange: qpid/branches/0.20/qpid/java/broker/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker:r1413364
Propchange: qpid/branches/0.20/qpid/java/broker-plugins/management-http/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker-plugins/management-http:r1413364
Propchange: qpid/branches/0.20/qpid/java/broker/bin/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker/bin:r1413364
Propchange: qpid/branches/0.20/qpid/java/broker/src/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker/src:r1413364
Propchange: qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0_SASL.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0_SASL.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/v1_0/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/v1_0:r1413364
Propchange: qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue:r1413364
Propchange: qpid/branches/0.20/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost:r1413364
Modified: qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java?rev=1414870&r1=1414869&r2=1414870&view=diff
==============================================================================
--- qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java (original)
+++ qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java Wed Nov 28 19:07:33 2012
@@ -33,6 +33,7 @@ import org.apache.qpid.configuration.Cli
import org.apache.qpid.framing.ProtocolVersion;
import org.apache.qpid.jms.BrokerDetails;
import org.apache.qpid.jms.ChannelLimitReachedException;
+import org.apache.qpid.jms.ConnectionURL;
import org.apache.qpid.jms.Session;
import org.apache.qpid.properties.ConnectionStartProperties;
import org.apache.qpid.protocol.AMQConstant;
@@ -214,7 +215,8 @@ public class AMQConnectionDelegate_0_10
+ "********");
}
- ConnectionSettings conSettings = retriveConnectionSettings(brokerDetail);
+ ConnectionSettings conSettings = retrieveConnectionSettings(brokerDetail);
+
_qpidConnection.setConnectionDelegate(new ClientConnectionDelegate(conSettings, _conn.getConnectionURL()));
_qpidConnection.connect(conSettings);
@@ -420,7 +422,7 @@ public class AMQConnectionDelegate_0_10
return featureSupported;
}
- private ConnectionSettings retriveConnectionSettings(BrokerDetails brokerDetail)
+ private ConnectionSettings retrieveConnectionSettings(BrokerDetails brokerDetail)
{
ConnectionSettings conSettings = brokerDetail.buildConnectionSettings();
@@ -442,6 +444,24 @@ public class AMQConnectionDelegate_0_10
conSettings.setHeartbeatInterval(getHeartbeatInterval(brokerDetail));
+ //Check connection-level ssl override setting
+ String connectionSslOption = _conn.getConnectionURL().getOption(ConnectionURL.OPTIONS_SSL);
+ if(connectionSslOption != null)
+ {
+ boolean connUseSsl = Boolean.parseBoolean(connectionSslOption);
+ boolean brokerlistUseSsl = conSettings.isUseSSL();
+
+ if( connUseSsl != brokerlistUseSsl)
+ {
+ conSettings.setUseSSL(connUseSsl);
+
+ if (_logger.isDebugEnabled())
+ {
+ _logger.debug("Applied connection ssl option override, setting UseSsl to: " + connUseSsl );
+ }
+ }
+ }
+
return conSettings;
}
Modified: qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java?rev=1414870&r1=1414869&r2=1414870&view=diff
==============================================================================
--- qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java (original)
+++ qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java Wed Nov 28 19:07:33 2012
@@ -40,6 +40,7 @@ import org.apache.qpid.framing.TxSelectB
import org.apache.qpid.framing.TxSelectOkBody;
import org.apache.qpid.jms.BrokerDetails;
import org.apache.qpid.jms.ChannelLimitReachedException;
+import org.apache.qpid.jms.ConnectionURL;
import org.apache.qpid.ssl.SSLContextFactory;
import org.apache.qpid.transport.ConnectionSettings;
import org.apache.qpid.transport.network.NetworkConnection;
@@ -100,6 +101,24 @@ public class AMQConnectionDelegate_8_0 i
ConnectionSettings settings = brokerDetail.buildConnectionSettings();
settings.setProtocol(brokerDetail.getTransport());
+ //Check connection-level ssl override setting
+ String connectionSslOption = _conn.getConnectionURL().getOption(ConnectionURL.OPTIONS_SSL);
+ if(connectionSslOption != null)
+ {
+ boolean connUseSsl = Boolean.parseBoolean(connectionSslOption);
+ boolean brokerlistUseSsl = settings.isUseSSL();
+
+ if( connUseSsl != brokerlistUseSsl)
+ {
+ settings.setUseSSL(connUseSsl);
+
+ if (_logger.isDebugEnabled())
+ {
+ _logger.debug("Applied connection ssl option override, setting UseSsl to: " + connUseSsl );
+ }
+ }
+ }
+
SecurityLayer securityLayer = SecurityLayerFactory.newInstance(settings);
OutgoingNetworkTransport transport = Transport.getOutgoingTransportInstance(getProtocolVersion());
Modified: qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/jms/ConnectionURL.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/jms/ConnectionURL.java?rev=1414870&r1=1414869&r2=1414870&view=diff
==============================================================================
--- qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/jms/ConnectionURL.java (original)
+++ qpid/branches/0.20/qpid/java/client/src/main/java/org/apache/qpid/jms/ConnectionURL.java Wed Nov 28 19:07:33 2012
@@ -44,6 +44,13 @@ public interface ConnectionURL
public static final String OPTIONS_FAILOVER_CYCLE = "cyclecount";
/**
+ * This option is used to apply a connection level override of
+ * the {@value BrokerDetails#OPTIONS_SSL} option values in the
+ * {@value ConnectionURL#OPTIONS_BROKERLIST};
+ */
+ public static final String OPTIONS_SSL = "ssl";
+
+ /**
* This option is only applicable for 0-8/0-9/0-9-1 protocols connection
* <p>
* It tells the client to delegate the requeue/DLQ decision to the
Modified: qpid/branches/0.20/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.20/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java?rev=1414870&r1=1414869&r2=1414870&view=diff
==============================================================================
--- qpid/branches/0.20/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java (original)
+++ qpid/branches/0.20/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java Wed Nov 28 19:07:33 2012
@@ -143,4 +143,25 @@ public class BrokerDetailsTest extends T
assertEquals("Unexpected toString", expectedToString, actualToString);
}
+
+ public void testDefaultSsl() throws URLSyntaxException
+ {
+ String brokerURL = "tcp://localhost:5672";
+ AMQBrokerDetails broker = new AMQBrokerDetails(brokerURL);
+
+ assertNull("default value should be null", broker.getProperty(BrokerDetails.OPTIONS_SSL));
+ }
+
+ public void testOverridingSsl() throws URLSyntaxException
+ {
+ String brokerURL = "tcp://localhost:5672?ssl='true'";
+ AMQBrokerDetails broker = new AMQBrokerDetails(brokerURL);
+
+ assertTrue("value should be true", Boolean.valueOf(broker.getProperty(BrokerDetails.OPTIONS_SSL)));
+
+ brokerURL = "tcp://localhost:5672?ssl='false''&maxprefetch='1'";
+ broker = new AMQBrokerDetails(brokerURL);
+
+ assertFalse("value should be false", Boolean.valueOf(broker.getProperty(BrokerDetails.OPTIONS_SSL)));
+ }
}
Modified: qpid/branches/0.20/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.20/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java?rev=1414870&r1=1414869&r2=1414870&view=diff
==============================================================================
--- qpid/branches/0.20/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java (original)
+++ qpid/branches/0.20/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java Wed Nov 28 19:07:33 2012
@@ -30,7 +30,6 @@ import org.apache.qpid.url.URLSyntaxExce
public class ConnectionURLTest extends TestCase
{
-
public void testFailoverURL() throws URLSyntaxException
{
String url = "amqp://ritchiem:bob@/test?brokerlist='tcp://localhost:5672;tcp://fancyserver:3000/',failover='roundrobin?cyclecount='100''";
@@ -563,5 +562,34 @@ public class ConnectionURLTest extends T
assertNull("Reject behaviour option was not as expected",
connectionurl.getOption(ConnectionURL.OPTIONS_REJECT_BEHAVIOUR));
}
+
+ /**
+ * Verify that when the ssl option is not specified, asking for the option returns null,
+ * such that this can later be used to verify it wasnt specified.
+ */
+ public void testDefaultSsl() throws URLSyntaxException
+ {
+ String url = "amqp://guest:guest@/test?brokerlist='tcp://localhost:5672'&foo='bar'";
+ ConnectionURL connectionURL = new AMQConnectionURL(url);
+
+ assertNull("default ssl value should be null", connectionURL.getOption(ConnectionURL.OPTIONS_SSL));
+ }
+
+ /**
+ * Verify that when the ssl option is specified, asking for the option returns the value,
+ * such that this can later be used to verify what value it was specified as.
+ */
+ public void testOverridingSsl() throws URLSyntaxException
+ {
+ String url = "amqp://guest:guest@/test?brokerlist='tcp://localhost:5672'&ssl='true'";
+ ConnectionURL connectionURL = new AMQConnectionURL(url);
+
+ assertTrue("value should be true", Boolean.valueOf(connectionURL.getOption(ConnectionURL.OPTIONS_SSL)));
+
+ url = "amqp://guest:guest@/test?brokerlist='tcp://localhost:5672'&ssl='false'";
+ connectionURL = new AMQConnectionURL(url);
+
+ assertFalse("value should be false", Boolean.valueOf(connectionURL.getOption(ConnectionURL.OPTIONS_SSL)));
+ }
}
Propchange: qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java:r1413364
Modified: qpid/branches/0.20/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.20/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java?rev=1414870&r1=1414869&r2=1414870&view=diff
==============================================================================
--- qpid/branches/0.20/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java (original)
+++ qpid/branches/0.20/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java Wed Nov 28 19:07:33 2012
@@ -28,6 +28,7 @@ import static org.apache.qpid.test.utils
import org.apache.commons.configuration.ConfigurationException;
import org.apache.qpid.client.AMQConnectionURL;
import org.apache.qpid.client.AMQTestConnection_0_10;
+import org.apache.qpid.jms.ConnectionURL;
import org.apache.qpid.test.utils.QpidBrokerTestCase;
import javax.jms.Connection;
@@ -78,6 +79,54 @@ public class SSLTest extends QpidBrokerT
}
}
+ /**
+ * Create an SSL connection using the SSL system properties for the trust and key store, but using
+ * the {@link ConnectionURL} ssl='true' option to indicate use of SSL at a Connection level,
+ * without specifying anything at the {@link ConnectionURL#OPTIONS_BROKERLIST} level.
+ */
+ public void testSslConnectionOption() throws Exception
+ {
+ if (shouldPerformTest())
+ {
+ //Start the broker (NEEDing client certificate authentication)
+ configureJavaBrokerIfNecessary(true, true, true, false);
+ super.setUp();
+
+ //Create URL enabling SSL at the connection rather than brokerlist level
+ String url = "amqp://guest:guest@test/?ssl='true'&brokerlist='tcp://localhost:%s'";
+ url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT);
+
+ Connection con = getConnection(new AMQConnectionURL(url));
+ assertNotNull("connection should be successful", con);
+ Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
+ assertNotNull("create session should be successful", ssn);
+ }
+ }
+
+ /**
+ * Create an SSL connection using the SSL system properties for the trust and key store, but using
+ * the {@link ConnectionURL} ssl='true' option to indicate use of SSL at a Connection level,
+ * overriding the false setting at the {@link ConnectionURL#OPTIONS_BROKERLIST} level.
+ */
+ public void testSslConnectionOptionOverridesBrokerlistOption() throws Exception
+ {
+ if (shouldPerformTest())
+ {
+ //Start the broker (NEEDing client certificate authentication)
+ configureJavaBrokerIfNecessary(true, true, true, false);
+ super.setUp();
+
+ //Create URL enabling SSL at the connection, overriding the false at the brokerlist level
+ String url = "amqp://guest:guest@test/?ssl='true'&brokerlist='tcp://localhost:%s?ssl='false''";
+ url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT);
+
+ Connection con = getConnection(new AMQConnectionURL(url));
+ assertNotNull("connection should be successful", con);
+ Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
+ assertNotNull("create session should be successful", ssn);
+ }
+ }
+
public void testCreateSSLConnectionUsingSystemProperties() throws Exception
{
if (shouldPerformTest())
Propchange: qpid/branches/0.20/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/CPPExcludes
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/CPPExcludes:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/Excludes
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/Excludes:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/JavaBDBExcludes
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/JavaBDBExcludes:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/JavaExcludes
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/JavaExcludes:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/JavaPre010Excludes
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/JavaPre010Excludes:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/JavaTransientExcludes
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/JavaTransientExcludes:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/XAExcludes
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/XAExcludes:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/cpp.async.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/cpp.async.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/cpp.cluster.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/cpp.cluster.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/cpp.noprefetch.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/cpp.noprefetch.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/cpp.ssl.excludes
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/cpp.ssl.excludes:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/cpp.ssl.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/cpp.ssl.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/cpp.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/cpp.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/java-bdb.0-9-1.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/java-bdb.0-9-1.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/java-dby.0-9-1.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/java-dby.0-9-1.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/java-mms.0-9-1.testprofile
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/java-mms.0-9-1.testprofile:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/log4j-test.xml
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/log4j-test.xml:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/test-provider.properties
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/test-provider.properties:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/test_resources/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/test_resources:r1413364
Propchange: qpid/branches/0.20/qpid/java/test-profiles/testprofile.defaults
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/test-profiles/testprofile.defaults:r1413364
Propchange: qpid/branches/0.20/qpid/packaging/windows/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/packaging/windows:r1413364
Propchange: qpid/branches/0.20/qpid/packaging/windows/installer.proj
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/packaging/windows/installer.proj:r1413364
Propchange: qpid/branches/0.20/qpid/python/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/python:r1413364
Propchange: qpid/branches/0.20/qpid/python/examples/api/spout
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/python/examples/api/spout:r1413364
Propchange: qpid/branches/0.20/qpid/python/qpid/concurrency.py
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/python/qpid/concurrency.py:r1413364
Propchange: qpid/branches/0.20/qpid/tests/src/py/qpid_tests/broker_0_9/queue.py
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_9/queue.py:r1413364
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org