summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-12-30 21:16:13 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-12-30 21:16:13 (GMT)
commitbfdec6263f7ad9965d3c15f0535a7a08ac805af1 (patch)
tree2bfb68e4bb78748863a0a0713a0e374637d1b143
parent5d4e27ecee12c2c2dc33b31a6128bcf4297574ac (diff)
parent36fe7926f888ba154b64904b91a5dd8c83e6c167 (diff)
downloadcpython-bfdec6263f7ad9965d3c15f0535a7a08ac805af1.zip
cpython-bfdec6263f7ad9965d3c15f0535a7a08ac805af1.tar.gz
cpython-bfdec6263f7ad9965d3c15f0535a7a08ac805af1.tar.bz2
merge 3.4 (#23111)
-rw-r--r--Lib/ftplib.py4
-rw-r--r--Misc/NEWS3
2 files changed, 5 insertions, 2 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index 2f084d0..135ec9c 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -713,7 +713,7 @@ else:
'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 @@ 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_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
index a5e1395..dfcf72a 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -207,6 +207,9 @@ Library
- 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.