cpython (merge 3.4 -> default): merge 3.4 (#23111)
https://hg.python.org/cpython/rev/33603f7949c5 changeset: 93992:33603f7949c5 parent: 93990:d5f2bcfd544c parent: 93991:414c450e8406 user: Benjamin Peterson <benjamin@python.org> date: Tue Dec 30 15:16:13 2014 -0600 summary: merge 3.4 (#23111) files: Lib/ftplib.py | 4 ++-- Misc/NEWS | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Lib/ftplib.py b/Lib/ftplib.py --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -713,7 +713,7 @@ '221 Goodbye.' >>> ''' - ssl_version = ssl.PROTOCOL_TLSv1 + ssl_version = ssl.PROTOCOL_SSLv23 def __init__(self, host='', user='', passwd='', acct='', keyfile=None, certfile=None, context=None, @@ -743,7 +743,7 @@ '''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_TLSv1: + if self.ssl_version >= ssl.PROTOCOL_SSLv23: resp = self.voidcmd('AUTH TLS') else: resp = self.voidcmd('AUTH SSL') diff --git a/Misc/NEWS b/Misc/NEWS --- a/Misc/NEWS +++ b/Misc/NEWS @@ -207,6 +207,9 @@ - Issue #23093: In the io, module allow more operations to work on detached streams. +- Issue #23111: In the ftplib, make ssl.PROTOCOL_SSLv23 the default protocol + version. + - Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(), instead of reading /dev/urandom, to get pseudo-random bytes. -- Repository URL: https://hg.python.org/cpython
participants (1)
-
benjamin.peterson