Author varde
Recipients varde
Date 2014-12-24.21:45:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1419457507.62.0.0499182915126.issue23111@psf.upfronthosting.co.za>
In-reply-to
Content
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')
History
Date User Action Args
2014-12-24 21:45:07vardesetrecipients: + varde
2014-12-24 21:45:07vardesetmessageid: <1419457507.62.0.0499182915126.issue23111@psf.upfronthosting.co.za>
2014-12-24 21:45:07vardelinkissue23111 messages
2014-12-24 21:45:07vardecreate