[issue29781] SSLObject.version returns incorrect value before handshake.

2017-09-06 Thread Christian Heimes
Changes by Christian Heimes : -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue29781] SSLObject.version returns incorrect value before handshake.

2017-09-06 Thread Christian Heimes
Christian Heimes added the comment: New changeset 6da379bde345926e1f7318ead973767f4d791d3e by Christian Heimes in branch '3.6': [3.6] bpo-29781: Fix SSLObject.version before handshake (GH-3364) (#3381) https://github.com/python/cpython/commit/6da379bde345926e1f7318ead973767f4d791d3e

[issue29781] SSLObject.version returns incorrect value before handshake.

2017-09-05 Thread Christian Heimes
Changes by Christian Heimes : -- pull_requests: +3389 ___ Python tracker ___ ___

[issue29781] SSLObject.version returns incorrect value before handshake.

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: New changeset 6877111648ac3e042ee5d0458cbeb65dd1a84b2d by Christian Heimes in branch 'master': bpo-29781: Fix SSLObject.version before handshake (#3364) https://github.com/python/cpython/commit/6877111648ac3e042ee5d0458cbeb65dd1a84b2d --

[issue29781] SSLObject.version returns incorrect value before handshake.

2017-09-05 Thread Christian Heimes
Changes by Christian Heimes : -- pull_requests: +3375 ___ Python tracker ___ ___

[issue29781] SSLObject.version returns incorrect value before handshake.

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: It should be possible to solve the issue w/o tracking the connection state manually. It doesn't work correctly with transparent negotiation -- that is implicit handshake with SSL_write(). SSL_is_init_finished()

[issue29781] SSLObject.version returns incorrect value before handshake.

2017-03-10 Thread Cory Benfield
Cory Benfield added the comment: I updated the test script to try with a file-descriptor set and OpenSSL returns TLSv1.2 for that one as well. This strongly suggests that OpenSSL's SSL_get_version documentation is somewhat misleading, and that an SSL object will return a version even when

[issue29781] SSLObject.version returns incorrect value before handshake.

2017-03-10 Thread Cory Benfield
Cory Benfield added the comment: This actually appears to be an outcome of OpenSSL's logic. I've attached a smallish C file that, when run against OpenSSL 1.0.2 on my machine, prints "TLSv1.2". This seems like a behaviour we'll have to work around in Python to get the outcome we want here.

[issue29781] SSLObject.version returns incorrect value before handshake.

2017-03-10 Thread Cory Benfield
Cory Benfield added the comment: A quick test reveals that Python 3.5 is also affected. -- versions: +Python 3.5 ___ Python tracker ___

[issue29781] SSLObject.version returns incorrect value before handshake.

2017-03-10 Thread Cory Benfield
New submission from Cory Benfield: The SSLObject object from the ssl module has a version() method that is undocumented. A reasonable assumption for the behaviour of that method is that it would follow the behaviour of the same method on SSLSocket(), which has the following documentation: >