or VERIFY_CRL_CHECK_LEAF to verify_flags

This commit is contained in:
Christian Heimes 2013-11-22 03:43:48 +01:00
parent d5b200ce2b
commit 32f0c7a67b
1 changed files with 2 additions and 2 deletions

View File

@ -1816,7 +1816,7 @@ else:
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
context.verify_mode = ssl.CERT_REQUIRED
context.load_verify_locations(SIGNING_CA)
context.verify_flags = ssl.VERIFY_DEFAULT
self.assertEqual(context.verify_flags, ssl.VERIFY_DEFAULT)
# VERIFY_DEFAULT should pass
server = ThreadedEchoServer(context=server_context, chatty=True)
@ -1827,7 +1827,7 @@ else:
self.assertTrue(cert, "Can't get peer certificate.")
# VERIFY_CRL_CHECK_LEAF without a loaded CRL file fails
context.verify_flags = ssl.VERIFY_CRL_CHECK_LEAF
context.verify_flags |= ssl.VERIFY_CRL_CHECK_LEAF
server = ThreadedEchoServer(context=server_context, chatty=True)
with server: