summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ssl.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-01-29 11:31:20 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-01-29 11:31:20 (GMT)
commit80f75e684e5a67d24bc327c3fc9e78a27ef0ef8c (patch)
tree8c75d4749c16418c254404c27b4bef3db941c3dd /Lib/test/test_ssl.py
parenta1eac7218ba098746f611e6edcc8eb5b72bc89e7 (diff)
downloadcpython-80f75e684e5a67d24bc327c3fc9e78a27ef0ef8c.zip
cpython-80f75e684e5a67d24bc327c3fc9e78a27ef0ef8c.tar.gz
cpython-80f75e684e5a67d24bc327c3fc9e78a27ef0ef8c.tar.bz2
Issue #10989: Fix a crash on SSLContext.load_verify_locations(None, True).
Patch reviewed by Antoine Pitrou, okayed by Georg Brandl.
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r--Lib/test/test_ssl.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 0e47595..4ea1a63 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -394,6 +394,9 @@ class ContextTests(unittest.TestCase):
ctx.load_verify_locations(CERTFILE, CAPATH)
ctx.load_verify_locations(CERTFILE, capath=BYTES_CAPATH)
+ # Issue #10989: crash if the second argument type is invalid
+ self.assertRaises(TypeError, ctx.load_verify_locations, None, True)
+
@skip_if_broken_ubuntu_ssl
def test_session_stats(self):
for proto in PROTOCOLS: