Browse Source

test that keyfile can be None

pull/9921/head
Benjamin Peterson 11 years ago
parent
commit
1ea070e561
  1. 2
      Lib/test/test_ssl.py

2
Lib/test/test_ssl.py

@ -727,7 +727,7 @@ class ContextTests(unittest.TestCase):
def test_load_cert_chain(self):
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
# Combined key and cert in a single file
ctx.load_cert_chain(CERTFILE)
ctx.load_cert_chain(CERTFILE, keyfile=None)
ctx.load_cert_chain(CERTFILE, keyfile=CERTFILE)
self.assertRaises(TypeError, ctx.load_cert_chain, keyfile=CERTFILE)
with self.assertRaises(OSError) as cm:

Loading…
Cancel
Save