Kaydet (Commit) 30474063 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

"xyzzy" is not a silly enough name for some OpenSSL versions to report an error

üst 9d74b42a
...@@ -143,7 +143,7 @@ class BasicSocketTests(unittest.TestCase): ...@@ -143,7 +143,7 @@ class BasicSocketTests(unittest.TestCase):
# Error checking can happen at instantiation or when connecting # Error checking can happen at instantiation or when connecting
with self.assertRaisesRegexp(ssl.SSLError, "No cipher can be selected"): with self.assertRaisesRegexp(ssl.SSLError, "No cipher can be selected"):
s = ssl.wrap_socket(socket.socket(socket.AF_INET), s = ssl.wrap_socket(socket.socket(socket.AF_INET),
cert_reqs=ssl.CERT_NONE, ciphers="xyzzy") cert_reqs=ssl.CERT_NONE, ciphers="^$:,;?*'dorothyx")
s.connect(remote) s.connect(remote)
@support.cpython_only @support.cpython_only
...@@ -187,7 +187,7 @@ class ContextTests(unittest.TestCase): ...@@ -187,7 +187,7 @@ class ContextTests(unittest.TestCase):
ctx.set_ciphers("ALL") ctx.set_ciphers("ALL")
ctx.set_ciphers("DEFAULT") ctx.set_ciphers("DEFAULT")
with self.assertRaisesRegexp(ssl.SSLError, "No cipher can be selected"): with self.assertRaisesRegexp(ssl.SSLError, "No cipher can be selected"):
ctx.set_ciphers("xyzzy") ctx.set_ciphers("^$:,;?*'dorothyx")
def test_verify(self): def test_verify(self):
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1) ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment