You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2015/02/03 18:05:49 UTC
[3/3] qpid-jms git commit: Adds some tests for bad password or no
password.
Adds some tests for bad password or no password.
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/0874817f
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/0874817f
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/0874817f
Branch: refs/heads/master
Commit: 0874817f4498a4bc906b5c3da9a71338fd1f5df1
Parents: 70b63d0
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Feb 3 11:15:42 2015 -0500
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue Feb 3 11:15:42 2015 -0500
----------------------------------------------------------------------
.../qpid/jms/transports/TransportSupportTest.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/0874817f/qpid-jms-client/src/test/java/org/apache/qpid/jms/transports/TransportSupportTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/transports/TransportSupportTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/transports/TransportSupportTest.java
index 09314ba..515ad8d 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/transports/TransportSupportTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/transports/TransportSupportTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import java.io.IOException;
+import java.security.UnrecoverableKeyException;
import java.util.Arrays;
import java.util.List;
@@ -68,6 +69,20 @@ public class TransportSupportTest extends QpidJmsTestCase {
assertEquals("TLS", context.getProtocol());
}
+ @Test(expected = UnrecoverableKeyException.class)
+ public void testCreateSslContextNoKeyStorePassword() throws Exception {
+ TransportSslOptions options = createJksSslOptions();
+ options.setKeyStorePassword(null);
+ TransportSupport.createSslContext(options);
+ }
+
+ @Test(expected = IOException.class)
+ public void testCreateSslContextWrongKeyStorePassword() throws Exception {
+ TransportSslOptions options = createJksSslOptions();
+ options.setKeyStorePassword("wrong");
+ TransportSupport.createSslContext(options);
+ }
+
@Test
public void testCreateSslContextJceksStore() throws Exception {
TransportSslOptions options = createJceksSslOptions();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org