diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-23 23:04:34 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-23 23:04:34 (GMT) |
commit | 7243b574e5fc6f9ae68dc5ebd8252047b8e78e3b (patch) | |
tree | 4cd25f9fde37754132337eebdd1b1e958bf979f4 /Lib/ftplib.py | |
parent | 378e15d7abedb4a1990230d5e3c74d2390be96c4 (diff) | |
download | cpython-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/ftplib.py')
-rw-r--r-- | Lib/ftplib.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index c83be2b..9c73f5f 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -747,9 +747,8 @@ else: resp = self.voidcmd('AUTH TLS') else: resp = self.voidcmd('AUTH SSL') - server_hostname = self.host if ssl.HAS_SNI else None self.sock = self.context.wrap_socket(self.sock, - server_hostname=server_hostname) + server_hostname=self.host) self.file = self.sock.makefile(mode='r', encoding=self.encoding) return resp @@ -788,9 +787,8 @@ else: def ntransfercmd(self, cmd, rest=None): conn, size = FTP.ntransfercmd(self, cmd, rest) if self._prot_p: - server_hostname = self.host if ssl.HAS_SNI else None conn = self.context.wrap_socket(conn, - server_hostname=server_hostname) + server_hostname=self.host) return conn, size def abort(self): |