Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9fe67cee
Commit
9fe67cee
authored
Jan 04, 2015
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make SSLv23 the default version in ftplib (closes #23111)
parent
c1edb585
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
Doc/library/ftplib.rst
Doc/library/ftplib.rst
+1
-1
Lib/ftplib.py
Lib/ftplib.py
+2
-2
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Doc/library/ftplib.rst
View file @
9fe67cee
...
...
@@ -384,7 +384,7 @@ FTP_TLS Objects
.. attribute:: FTP_TLS.ssl_version
The SSL version to use (defaults to
*TLSv1*
).
The SSL version to use (defaults to
:attr:`ssl.PROTOCOL_SSLv23`
).
.. method:: FTP_TLS.auth()
...
...
Lib/ftplib.py
View file @
9fe67cee
...
...
@@ -638,7 +638,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
,
timeout
=
_GLOBAL_DEFAULT_TIMEOUT
):
...
...
@@ -656,7 +656,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'
)
...
...
Misc/NEWS
View file @
9fe67cee
...
...
@@ -15,6 +15,8 @@ Core and Builtins
Library
-------
- Issue #23111: Maximize compatibility in protocol versions of ftplib.FTP_TLS.
- Issue #23112: Fix SimpleHTTPServer to correctly carry the query string and
fragment when it redirects to add a trailing slash.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment