cpython: 9377ed49746b (original) (raw)
Mercurial > cpython
changeset 103114:9377ed49746b
Issue 27866: relax test case for set_cipher() and allow more cipher suites
Christian Heimes christian@python.org | |
---|---|
date | Tue, 06 Sep 2016 10:45:44 +0200 |
parents | 8ee4ed577c03 |
children | e3b83bfa02c5 |
files | Lib/test/test_ssl.py |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-)[+] [-] Lib/test/test_ssl.py 7 |
line wrap: on
line diff
--- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -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')[](#l1.7)
ctx.set_ciphers('AESGCM')[](#l1.8) names = set(d['name'] for d in ctx.get_ciphers())[](#l1.9)
self.assertEqual(names,[](#l1.10)
{'ECDHE-RSA-AES256-GCM-SHA384',[](#l1.11)
'ECDHE-RSA-AES128-GCM-SHA256'})[](#l1.12)
self.assertIn('ECDHE-RSA-AES256-GCM-SHA384', names)[](#l1.13)
self.assertIn('ECDHE-RSA-AES128-GCM-SHA256', names)[](#l1.14)