New submission from varde:
When trying to connect to a server which only supports TLS version 1.1 or 1.2,
the following error is raised:
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:598)
For some reason, the SSL version is set to ssl.PROTOCOL_TLSv1 before
initialisation and an SSL context is created in __init__, making any subsequent
change to ssl_version useless.
The only way to establish a successful connection is to pass a custom SSL
context to the constructor.
I think ssl_version should be settable at construction time before the context
is created.
I'm not sure exposing ssl_version is useful either, the documentation mentions
it but it has no use after initialisation.
The following lines should also be changed:
if self.ssl_version == ssl.PROTOCOL_TLSv1:
resp = self.voidcmd('AUTH TLS')
----------
components: Library (Lib)
messages: 233087
nosy: varde
priority: normal
severity: normal
status: open
title: ftplib.FTP_TLS's default constructor does not work with TLSv1.1 or
TLSv1.2
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23111>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com