diff options
author | Christian Heimes <christian@python.org> | 2017-09-15 18:27:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 18:27:30 (GMT) |
commit | a170fa162dc03f0a014373349e548954fff2e567 (patch) | |
tree | ed08062f8462d8b9e98e38b7832e39a85881b4e3 /Lib/ftplib.py | |
parent | 4df60f18c64ba2835e68bf3eed08d8002a00f4ac (diff) | |
download | cpython-a170fa162dc03f0a014373349e548954fff2e567.zip cpython-a170fa162dc03f0a014373349e548954fff2e567.tar.gz cpython-a170fa162dc03f0a014373349e548954fff2e567.tar.bz2 |
bpo-31346: Use PROTOCOL_TLS_CLIENT/SERVER (#3058)
Replaces PROTOCOL_TLSv* and PROTOCOL_SSLv23 with PROTOCOL_TLS_CLIENT and
PROTOCOL_TLS_SERVER.
Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r-- | Lib/ftplib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index a02e595..05840d4 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -719,7 +719,7 @@ else: '221 Goodbye.' >>> ''' - ssl_version = ssl.PROTOCOL_SSLv23 + ssl_version = ssl.PROTOCOL_TLS_CLIENT def __init__(self, host='', user='', passwd='', acct='', keyfile=None, certfile=None, context=None, @@ -753,7 +753,7 @@ else: '''Set up secure control connection by using TLS/SSL.''' if isinstance(self.sock, ssl.SSLSocket): raise ValueError("Already using TLS") - if self.ssl_version >= ssl.PROTOCOL_SSLv23: + if self.ssl_version >= ssl.PROTOCOL_TLS: resp = self.voidcmd('AUTH TLS') else: resp = self.voidcmd('AUTH SSL') |