summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-03-24 12:33:32 (GMT)
committerGitHub <noreply@github.com>2023-03-24 12:33:32 (GMT)
commit0a2b63f6adfa010fa9b18c1deaac4e738bb99c84 (patch)
treec6a60d365e6a420e14288f25aebd31a1fed37827 /Lib
parent206c2b1b123f82a8edfe8619756b1f1b77d54feb (diff)
downloadcpython-0a2b63f6adfa010fa9b18c1deaac4e738bb99c84.zip
cpython-0a2b63f6adfa010fa9b18c1deaac4e738bb99c84.tar.gz
cpython-0a2b63f6adfa010fa9b18c1deaac4e738bb99c84.tar.bz2
[3.10] gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (GH-96932) (#102919)
gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (GH-96932) (cherry picked from commit af9c34f6ef8dceb21871206eb3e4d350f6e3d3dc) Co-authored-by: Benjamin Fogle <benfogle@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ssl.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index f97227b..addfb6c 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -2326,13 +2326,13 @@ class SimpleBackgroundTests(unittest.TestCase):
self.assertIs(sslobj._sslobj.owner, sslobj)
self.assertIsNone(sslobj.cipher())
self.assertIsNone(sslobj.version())
- self.assertIsNotNone(sslobj.shared_ciphers())
+ self.assertIsNone(sslobj.shared_ciphers())
self.assertRaises(ValueError, sslobj.getpeercert)
if 'tls-unique' in ssl.CHANNEL_BINDING_TYPES:
self.assertIsNone(sslobj.get_channel_binding('tls-unique'))
self.ssl_io_loop(sock, incoming, outgoing, sslobj.do_handshake)
self.assertTrue(sslobj.cipher())
- self.assertIsNotNone(sslobj.shared_ciphers())
+ self.assertIsNone(sslobj.shared_ciphers())
self.assertIsNotNone(sslobj.version())
self.assertTrue(sslobj.getpeercert())
if 'tls-unique' in ssl.CHANNEL_BINDING_TYPES:
@@ -4310,7 +4310,7 @@ class ThreadedTests(unittest.TestCase):
def test_shared_ciphers(self):
client_context, server_context, hostname = testing_context()
client_context.set_ciphers("AES128:AES256")
- server_context.set_ciphers("AES256")
+ server_context.set_ciphers("AES256:eNULL")
expected_algs = [
"AES256", "AES-256",
# TLS 1.3 ciphers are always enabled