aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_tcp.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_tcp.py')
-rw-r--r--test/test_tcp.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/test_tcp.py b/test/test_tcp.py
index 318d2abc..f45acb00 100644
--- a/test/test_tcp.py
+++ b/test/test_tcp.py
@@ -34,6 +34,14 @@ class CertHandler(tcp.BaseHandler):
self.wfile.flush()
+class ClientCipherListHandler(tcp.BaseHandler):
+ sni = None
+
+ def handle(self):
+ self.wfile.write("%s"%self.connection.get_cipher_list())
+ self.wfile.flush()
+
+
class DisconnectHandler(tcp.BaseHandler):
def handle(self):
self.close()
@@ -180,6 +188,22 @@ class TestSNI(test.ServerTestBase):
assert c.rfile.readline() == "foo.com"
+class TestClientCipherList(test.ServerTestBase):
+ handler = ClientCipherListHandler
+ ssl = dict(
+ cert = tutils.test_data.path("data/server.crt"),
+ key = tutils.test_data.path("data/server.key"),
+ request_client_cert = False,
+ v3_only = False,
+ cipher_list = 'RC4-SHA'
+ )
+ def test_echo(self):
+ c = tcp.TCPClient("127.0.0.1", self.port)
+ c.connect()
+ c.convert_to_ssl(sni="foo.com")
+ assert c.rfile.readline() == "['RC4-SHA']"
+
+
class TestSSLDisconnect(test.ServerTestBase):
handler = DisconnectHandler
ssl = dict(