]> granicus.if.org Git - python/commitdiff
Issue 27866: relax test case for set_cipher() and allow more cipher suites
authorChristian Heimes <christian@python.org>
Tue, 6 Sep 2016 08:45:44 +0000 (10:45 +0200)
committerChristian Heimes <christian@python.org>
Tue, 6 Sep 2016 08:45:44 +0000 (10:45 +0200)
Lib/test/test_ssl.py

index f19cf433369f6484ff9ca1c0879dd21d476755ad..07fb1026a5145ec54942b398a32d777c3d09d178 100644 (file)
@@ -837,11 +837,10 @@ class ContextTests(unittest.TestCase):
     @unittest.skipIf(ssl.OPENSSL_VERSION_INFO < (1, 0, 2, 0, 0), 'OpenSSL too old')
     def test_get_ciphers(self):
         ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
-        ctx.set_ciphers('ECDHE+AESGCM:!ECDSA')
+        ctx.set_ciphers('AESGCM')
         names = set(d['name'] for d in ctx.get_ciphers())
-        self.assertEqual(names,
-                        {'ECDHE-RSA-AES256-GCM-SHA384',
-                         'ECDHE-RSA-AES128-GCM-SHA256'})
+        self.assertIn('ECDHE-RSA-AES256-GCM-SHA384', names)
+        self.assertIn('ECDHE-RSA-AES128-GCM-SHA256', names)
 
     @skip_if_broken_ubuntu_ssl
     def test_options(self):