[issue20421] expose SSL socket protocol version

Antoine Pitrou report at bugs.python.org
Fri Apr 18 20:41:06 CEST 2014


Antoine Pitrou added the comment:

Ok, it came to me that converting to one of the PROTOCOL* constants can fail in the following case: Python is linked with an OpenSSL that supports a more recent protocol version than the ssl module is aware of. SSL_get_version() can then return a protocol (e.g. "TLSv1.3") that we don't know about, and have no way of converting to an existing constant.

So perhaps we should really simply return the same string as OpenSSL?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20421>
_______________________________________


More information about the Python-bugs-list mailing list