aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_pathoc.py5
-rw-r--r--test/test_pathod.py10
2 files changed, 8 insertions, 7 deletions
diff --git a/test/test_pathoc.py b/test/test_pathoc.py
index 23b42994..ca67ff1f 100644
--- a/test/test_pathoc.py
+++ b/test/test_pathoc.py
@@ -78,7 +78,10 @@ class _TestDaemon:
class TestDaemonSSL(_TestDaemon):
ssl = True
- ssloptions = pathod.SSLOptions(request_client_cert=True)
+ ssloptions = pathod.SSLOptions(
+ request_client_cert=True,
+ sans = ["test1.com", "test2.com"]
+ )
def test_sni(self):
c = pathoc.Pathoc(
diff --git a/test/test_pathod.py b/test/test_pathod.py
index c966222f..3638960e 100644
--- a/test/test_pathod.py
+++ b/test/test_pathod.py
@@ -206,16 +206,14 @@ class TestDaemon(CommonTests):
class TestDaemonSSL(CommonTests):
ssl = True
- def _test_ssl_conn_failure(self):
+
+ def test_ssl_conn_failure(self):
c = tcp.TCPClient(("localhost", self.d.port))
c.rbufsize = 0
c.wbufsize = 0
c.connect()
- try:
- while 1:
- c.wfile.write("\r\n\r\n\r\n")
- except:
- pass
+ c.wfile.write("\0\0\0\0")
+ tutils.raises(tcp.NetLibError, c.convert_to_ssl)
l = self.d.last_log()
assert l["type"] == "error"
assert "SSL" in l["msg"]