Roundup Robot added the comment:
New changeset 648685f8d5e9 by Antoine Pitrou in branch 'default':
Issue #20421: Add a .version() method to SSL sockets exposing the actual
protocol version in use.
http://hg.python.org/cpython/rev/648685f8d5e9
--
nosy: +python-dev
Antoine Pitrou added the comment:
Pushed to default.
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20421
___
Alex Gaynor added the comment:
Should this be backported to 2.7.9?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20421
___
___
Python-bugs-list
Antoine Pitrou added the comment:
It's as you want, now. I don't think this is really important, though.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20421
___
Alex Gaynor added the comment:
Attached patch backports it (only change is the use of `closing()` and
resolving the conflict in Misc/NEWS). I'll leave it up to benjamin whether he
wants to commit (input from others welcome). My view is to prefer backporting
stuff since it helps keep the diff
Roundup Robot added the comment:
New changeset 16c86a6bdbe2 by Alex Gaynor in branch '2.7':
Issue #20421: Add a .version() method to SSL sockets exposing the actual
protocol version in use.
http://hg.python.org/cpython/rev/16c86a6bdbe2
--
___
Python
Antoine Pitrou added the comment:
Updated patch with doc.
--
stage: needs patch - patch review
Added file: http://bugs.python.org/file36509/ssl_version2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20421
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +geertj
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20421
___
___
Python-bugs-list mailing
Antoine Pitrou added the comment:
Here is a patch. Doc updates still missing.
--
keywords: +patch
Added file: http://bugs.python.org/file36440/ssl_version.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20421
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
Giampaolo Rodola' added the comment:
Debatable. Maybe I'm +0.1 for returning the plain string. IMO when it comes to
stdlib modules, enums are only really useful for converting integer constants.
--
___
Python tracker rep...@bugs.python.org
Ethan Furman added the comment:
Sounds good to me.
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20421
___
___
Antoine Pitrou added the comment:
We could actually use the undocumented int SSL_version(const SSL *s) and
convert the return value to one of our favourite protocol constants.
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
(slightly related: should ssl.PROTOCOL_xxx constants become enum members?)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20421
___
Changes by Alex Gaynor alex.gay...@gmail.com:
--
nosy: +alex
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20421
___
___
Python-bugs-list mailing
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +dstufft
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20421
___
___
Python-bugs-list mailing
New submission from Antoine Pitrou:
SSL sockets should provide a way to query the current protocol version (e.g.
TLSv1.2). OpenSSL makes it easy through SSL_get_version().
Open question is whether we return the string returned by SSL_get_version(), or
we convert it to one of the constants
17 matches
Mail list logo