Issue #10989: Fix a crash on SSLContext.load_verify_locations(None, True).

Patch reviewed by Antoine Pitrou, okayed by Georg Brandl.
This commit is contained in:
Victor Stinner 2011-01-29 11:31:20 +00:00
parent a1eac7218b
commit 80f75e684e
3 changed files with 6 additions and 1 deletions

View file

@ -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: