]> granicus.if.org Git - python/commitdiff
bpo-26867: Ubuntu's openssl OP_NO_SSLv3 is forced on by default; fix test. (GH-374)
authorXiang Zhang <angwerzx@126.com>
Wed, 1 Mar 2017 07:36:15 +0000 (15:36 +0800)
committerGitHub <noreply@github.com>
Wed, 1 Mar 2017 07:36:15 +0000 (15:36 +0800)
Lib/test/test_ssl.py

index a17d6131a6eb6853f8162114b89c31be18c6a761..a1258c65a576b54cde7d283f464562fe4a41e231 100644 (file)
@@ -777,7 +777,8 @@ class ContextTests(unittest.TestCase):
             ctx.options = (ctx.options & ~ssl.OP_NO_TLSv1)
             self.assertEqual(default, 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