diff options
| author | Benjamin Peterson <benjamin@python.org> | 2014-11-23 17:04:34 -0600 |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2014-11-23 17:04:34 -0600 |
| commit | 7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b (patch) | |
| tree | 4cd25f9fde37754132337eebdd1b1e958bf979f4 /Lib/ssl.py | |
| parent | 378e15d7abedb4a1990230d5e3c74d2390be96c4 (diff) | |
| download | cpython-git-7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b.tar.gz | |
don't require OpenSSL SNI to pass hostname to ssl functions (#22921)
Patch by Donald Stufft.
Diffstat (limited to 'Lib/ssl.py')
| -rw-r--r-- | Lib/ssl.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py index 2b81b790d8..3d4997caf0 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -538,12 +538,7 @@ class SSLSocket(socket): raise ValueError("server_hostname can only be specified " "in client mode") if self._context.check_hostname and not server_hostname: - if HAS_SNI: - raise ValueError("check_hostname requires server_hostname") - else: - raise ValueError("check_hostname requires server_hostname, " - "but it's not supported by your OpenSSL " - "library") + raise ValueError("check_hostname requires server_hostname") self.server_side = server_side self.server_hostname = server_hostname self.do_handshake_on_connect = do_handshake_on_connect |
