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
36fe7926
Commit
36fe7926
authored
Dec 30, 2014
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make PROTOCOL_SSLv23 the default protocol version for ftplib (closes #23111)
parent
3cd1af51
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Lib/ftplib.py
Lib/ftplib.py
+2
-2
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/ftplib.py
View file @
36fe7926
...
...
@@ -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'
)
...
...
Misc/NEWS
View file @
36fe7926
...
...
@@ -41,6 +41,9 @@ Core and Builtins
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.
...
...
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