summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ssl.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-11-23 23:04:34 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-11-23 23:04:34 (GMT)
commit7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b (patch)
tree4cd25f9fde37754132337eebdd1b1e958bf979f4 /Lib/test/test_ssl.py
parent378e15d7abedb4a1990230d5e3c74d2390be96c4 (diff)
downloadcpython-7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b.zip
cpython-7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b.tar.gz
cpython-7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b.tar.bz2
don't require OpenSSL SNI to pass hostname to ssl functions (#22921)
Patch by Donald Stufft.
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r--Lib/test/test_ssl.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 7f1f405..928f5e6 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -1281,11 +1281,8 @@ class NetworkedTests(unittest.TestCase):
# Same with a server hostname
s = ctx.wrap_socket(socket.socket(socket.AF_INET),
server_hostname="svn.python.org")
- if ssl.HAS_SNI:
- s.connect(("svn.python.org", 443))
- s.close()
- else:
- self.assertRaises(ValueError, s.connect, ("svn.python.org", 443))
+ s.connect(("svn.python.org", 443))
+ s.close()
# This should fail because we have no verification certs
ctx.verify_mode = ssl.CERT_REQUIRED
s = ctx.wrap_socket(socket.socket(socket.AF_INET))
@@ -2038,7 +2035,6 @@ else:
cert = s.getpeercert()
self.assertTrue(cert, "Can't get peer certificate.")
- @needs_sni
def test_check_hostname(self):
if support.verbose:
sys.stdout.write("\n")