]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #26867: Ubuntu's openssl OP_NO_SSLv3 is forced on by default; fix test.
authorMatthias Klose <doko@ubuntu.com>
Mon, 13 Jun 2016 06:40:00 +0000 (23:40 -0700)
committerMatthias Klose <doko@ubuntu.com>
Mon, 13 Jun 2016 06:40:00 +0000 (23:40 -0700)
Lib/test/test_ssl.py

index 645ec8d100c41965ffe1d9de6f6d9043fa60628a..d2fc36d84ea0d67dfd8c35c80e1b5c478d67812f 100644 (file)
@@ -821,7 +821,8 @@ class ContextTests(unittest.TestCase):
             self.assertEqual(ssl.OP_ALL | ssl.OP_NO_TLSv1 | ssl.OP_NO_SSLv3,
                              ctx.options)
             ctx.options = 0
-            self.assertEqual(0, ctx.options)
+            # Ubuntu has OP_NO_SSLv3 forced on by default
+            self.assertEqual(0, ctx.options & ~ssl.OP_NO_SSLv3)
         else:
             with self.assertRaises(ValueError):
                 ctx.options = 0