diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-03-05 03:49:41 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-03-05 03:49:41 (GMT) |
commit | 990fcaac3c428569697f62a80fd95ab4d4b93151 (patch) | |
tree | 5bcaae3384ac88a2749f9422f72708c6a2faa1e7 /Lib/test/test_ssl.py | |
parent | fdb19715879babc580f63bc129f5b0ff46482d1c (diff) | |
download | cpython-990fcaac3c428569697f62a80fd95ab4d4b93151.zip cpython-990fcaac3c428569697f62a80fd95ab4d4b93151.tar.gz cpython-990fcaac3c428569697f62a80fd95ab4d4b93151.tar.bz2 |
expose X509_V_FLAG_TRUSTED_FIRST
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index dc82475..6353e23 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -710,8 +710,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 |