mirror of https://github.com/python/cpython
or VERIFY_CRL_CHECK_LEAF to verify_flags
This commit is contained in:
parent
d5b200ce2b
commit
32f0c7a67b
|
@ -1816,7 +1816,7 @@ else:
|
||||||
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
||||||
context.verify_mode = ssl.CERT_REQUIRED
|
context.verify_mode = ssl.CERT_REQUIRED
|
||||||
context.load_verify_locations(SIGNING_CA)
|
context.load_verify_locations(SIGNING_CA)
|
||||||
context.verify_flags = ssl.VERIFY_DEFAULT
|
self.assertEqual(context.verify_flags, ssl.VERIFY_DEFAULT)
|
||||||
|
|
||||||
# VERIFY_DEFAULT should pass
|
# VERIFY_DEFAULT should pass
|
||||||
server = ThreadedEchoServer(context=server_context, chatty=True)
|
server = ThreadedEchoServer(context=server_context, chatty=True)
|
||||||
|
@ -1827,7 +1827,7 @@ else:
|
||||||
self.assertTrue(cert, "Can't get peer certificate.")
|
self.assertTrue(cert, "Can't get peer certificate.")
|
||||||
|
|
||||||
# VERIFY_CRL_CHECK_LEAF without a loaded CRL file fails
|
# 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)
|
server = ThreadedEchoServer(context=server_context, chatty=True)
|
||||||
with server:
|
with server:
|
||||||
|
|
Loading…
Reference in New Issue