mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
Issue 27866: relax test case for set_cipher() and allow more cipher suites
This commit is contained in:
parent
3466bde1cc
commit
ea9b2dc9e3
1 changed files with 3 additions and 4 deletions
|
|
@ -837,11 +837,10 @@ class ContextTests(unittest.TestCase):
|
||||||
@unittest.skipIf(ssl.OPENSSL_VERSION_INFO < (1, 0, 2, 0, 0), 'OpenSSL too old')
|
@unittest.skipIf(ssl.OPENSSL_VERSION_INFO < (1, 0, 2, 0, 0), 'OpenSSL too old')
|
||||||
def test_get_ciphers(self):
|
def test_get_ciphers(self):
|
||||||
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
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())
|
names = set(d['name'] for d in ctx.get_ciphers())
|
||||||
self.assertEqual(names,
|
self.assertIn('ECDHE-RSA-AES256-GCM-SHA384', names)
|
||||||
{'ECDHE-RSA-AES256-GCM-SHA384',
|
self.assertIn('ECDHE-RSA-AES128-GCM-SHA256', names)
|
||||||
'ECDHE-RSA-AES128-GCM-SHA256'})
|
|
||||||
|
|
||||||
@skip_if_broken_ubuntu_ssl
|
@skip_if_broken_ubuntu_ssl
|
||||||
def test_options(self):
|
def test_options(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue