changeset: 93991:414c450e8406 branch: 3.4 parent: 93987:483746c32296 user: Benjamin Peterson date: Tue Dec 30 15:15:43 2014 -0600 files: Lib/ftplib.py Misc/NEWS description: make PROTOCOL_SSLv23 the default protocol version for ftplib (closes #23111) diff -r 483746c32296 -r 414c450e8406 Lib/ftplib.py --- a/Lib/ftplib.py Tue Dec 30 10:09:17 2014 -0600 +++ b/Lib/ftplib.py Tue Dec 30 15:15:43 2014 -0600 @@ -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 -r 483746c32296 -r 414c450e8406 Misc/NEWS --- a/Misc/NEWS Tue Dec 30 10:09:17 2014 -0600 +++ b/Misc/NEWS Tue Dec 30 15:15:43 2014 -0600 @@ -41,6 +41,9 @@ Library ------- +- 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.