mirror of
https://github.com/python/cpython.git
synced 2025-09-07 01:11:26 +00:00
test that keyfile can be None
This commit is contained in:
parent
8d2d5b9c59
commit
1ea070e561
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue