mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
merge 3.4
This commit is contained in:
commit
de8eca4638
3 changed files with 18 additions and 5 deletions
|
|
@ -818,8 +818,9 @@ class ContextTests(unittest.TestCase):
|
|||
"verify_flags need OpenSSL > 0.9.8")
|
||||
def test_verify_flags(self):
|
||||
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
||||
# default value by OpenSSL
|
||||
self.assertEqual(ctx.verify_flags, ssl.VERIFY_DEFAULT)
|
||||
# default value
|
||||
tf = getattr(ssl, "VERIFY_X509_TRUSTED_FIRST", 0)
|
||||
self.assertEqual(ctx.verify_flags, ssl.VERIFY_DEFAULT | tf)
|
||||
ctx.verify_flags = ssl.VERIFY_CRL_CHECK_LEAF
|
||||
self.assertEqual(ctx.verify_flags, ssl.VERIFY_CRL_CHECK_LEAF)
|
||||
ctx.verify_flags = ssl.VERIFY_CRL_CHECK_CHAIN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue