You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2019/05/10 20:36:53 UTC
[qpid-jms-amqp-0-x] branch master updated: QPID-8283: [JMS AMQP
0-x] Fix setting option 'encryption_trust_store_password'
This is an automated email from the ASF dual-hosted git repository.
orudyy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-jms-amqp-0-x.git
The following commit(s) were added to refs/heads/master by this push:
new e3a88f0 QPID-8283: [JMS AMQP 0-x] Fix setting option 'encryption_trust_store_password'
e3a88f0 is described below
commit e3a88f02b5c099fe4b21bec1790cae7731795810
Author: Alex Rudyy <or...@apache.org>
AuthorDate: Fri May 10 21:30:10 2019 +0100
QPID-8283: [JMS AMQP 0-x] Fix setting option 'encryption_trust_store_password'
---
.../java/org/apache/qpid/client/BrokerDetails.java | 2 +-
.../client/BrokerDetails/BrokerDetailsTest.java | 24 ++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/client/src/main/java/org/apache/qpid/client/BrokerDetails.java b/client/src/main/java/org/apache/qpid/client/BrokerDetails.java
index 609dd59..0ce3fd3 100644
--- a/client/src/main/java/org/apache/qpid/client/BrokerDetails.java
+++ b/client/src/main/java/org/apache/qpid/client/BrokerDetails.java
@@ -559,7 +559,7 @@ public class BrokerDetails implements Serializable
if (getProperty(BrokerDetails.OPTIONS_ENCRYPTION_TRUST_STORE_PASSWORD) != null)
{
- conSettings.setEncryptionKeyStorePassword(
+ conSettings.setEncryptionTrustStorePassword(
getProperty(BrokerDetails.OPTIONS_ENCRYPTION_TRUST_STORE_PASSWORD));
}
diff --git a/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java b/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
index fd0e7d0..3d7e63f 100644
--- a/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
+++ b/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
@@ -247,4 +247,28 @@ public class BrokerDetailsTest extends QpidTestCase
assertNull(String.format("Unexpected '%s' property value", BrokerDetails.OPTIONS_SSL_VERIFY_HOSTNAME),
broker.getProperty(BrokerDetails.OPTIONS_SSL_VERIFY_HOSTNAME));
}
+
+ public void testEncryptionKeyStorePath() throws Exception
+ {
+ String brokerURL = "tcp://localhost:5672?ssl='true'&encryption_key_store='path'";
+ BrokerDetails broker = new BrokerDetails(brokerURL);
+ ConnectionSettings connectionSettings = broker.buildConnectionSettings();
+ assertEquals("path", connectionSettings.getEncryptionKeyStorePath());
+ }
+
+ public void testEncryptionKeyStorePassword() throws Exception
+ {
+ String brokerURL = "tcp://localhost:5672?ssl='true'&encryption_key_store_password='pass'&encryption_trust_store_password='foo'";
+ BrokerDetails broker = new BrokerDetails(brokerURL);
+ ConnectionSettings connectionSettings = broker.buildConnectionSettings();
+ assertEquals("pass", connectionSettings.getEncryptionKeyStorePassword());
+ }
+
+ public void testEncryptionTrustStorePassword() throws Exception
+ {
+ String brokerURL = "tcp://localhost:5672?ssl='true'&encryption_key_store_password='pass'&encryption_trust_store_password='foo'";
+ BrokerDetails broker = new BrokerDetails(brokerURL);
+ ConnectionSettings connectionSettings = broker.buildConnectionSettings();
+ assertEquals("foo", connectionSettings.getEncryptionTrustStorePassword());
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org