You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by cl...@apache.org on 2016/06/13 17:46:39 UTC
qpid-proton git commit: PROTON-1233: Add python SSL test for null
hostname failure
Repository: qpid-proton
Updated Branches:
refs/heads/master 6243919fd -> 1f7ccdd55
PROTON-1233: Add python SSL test for null hostname failure
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/1f7ccdd5
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/1f7ccdd5
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/1f7ccdd5
Branch: refs/heads/master
Commit: 1f7ccdd551b344a5a67dfdee3840e16d10990577
Parents: 6243919
Author: Clifford Jansen <cl...@apache.org>
Authored: Mon Jun 13 10:46:14 2016 -0700
Committer: Clifford Jansen <cl...@apache.org>
Committed: Mon Jun 13 10:46:14 2016 -0700
----------------------------------------------------------------------
tests/python/proton_tests/ssl.py | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1f7ccdd5/tests/python/proton_tests/ssl.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/ssl.py b/tests/python/proton_tests/ssl.py
index 03d1713..89fe828 100644
--- a/tests/python/proton_tests/ssl.py
+++ b/tests/python/proton_tests/ssl.py
@@ -808,6 +808,30 @@ class SslTest(common.Test):
del server
self.tearDown()
+ def test_server_hostname_authentication_2(self):
+ """Initially separated from test_server_hostname_authentication
+ above to force Windows checking and sidestep PROTON-1057 exclusion.
+ """
+
+ # Fail for a null peer name.
+ self.server_domain.set_credentials(self._testpath("server-wc-certificate.pem"),
+ self._testpath("server-wc-private-key.pem"),
+ "server-password")
+ self.client_domain.set_trusted_ca_db(self._testpath("ca-certificate.pem"))
+ self.client_domain.set_peer_authentication( SSLDomain.VERIFY_PEER_NAME )
+
+ server = SslTest.SslTestConnection( self.server_domain, mode=Transport.SERVER )
+ client = SslTest.SslTestConnection( self.client_domain )
+
+ # Next line results in an eventual pn_ssl_set_peer_hostname(client.ssl._ssl, None)
+ client.ssl.peer_hostname = None
+ self._do_handshake( client, server )
+ assert client.transport.closed
+ assert server.transport.closed
+ assert client.connection.state & Endpoint.REMOTE_UNINIT
+ assert server.connection.state & Endpoint.REMOTE_UNINIT
+ self.tearDown()
+
def test_defaults_messenger_app(self):
""" Test an SSL connection using the Messenger apps (no certificates)
"""
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org