-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for querying the negotiated TLS version. #184
Conversation
Failure is expected - the travis run was before the cryptography change was merged (it is now). |
Thanks. I think this change will also need to include a bump to the declared required cryptography version in setup.py (which is easier after cryptography releases the new feature that's required, but I think you can construct a |
We'll be releasing 0.7.2 with the binding required for this feature in the next day or two. |
99398ee
to
fb73e0b
Compare
I've updated setup.py in my branch. |
Obtain the protocol version of the current connection. | ||
|
||
:returns: The TLS version of the current connection, for example | ||
the value for TLS 1.2 would be 0x303. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be hard for most people to generalize from "0x303 means TLS 1.2" to an understanding of other values. Or maybe that's just mean. Anyway, can you expand this documentation or make it easier to understand these values some other way? An example of a non-documentation solution might be to make the result self-documenting by defining a collection of symbolic constants and referring to that collection here. Or another solution might be to refer to some existing OpenSSL documentation about this value.
Which brings me to another point, where is the documentation for SSL_version
? I can't find any. I did find SSL_get_version
which apparently returns a string instead. Exposing that instead might be another way to solve the documentation issue - since "TLS1.2" doesn't need as much explanation as 0x303 (though just going by the OpenSSL documentation, I don't know if "TLSv1.2" is a value that will ever be returned by SSL_get_version
! It only documents "SSLv2", "SSLv3", and "TLSv1" - oh, and, awesomely, "unknown").
Thanks. Can you also add documentation to docs/api/ and an entry to ChangeLog? |
Hi richmoore. Any interest in following up on this or would it be better if someone else finished it up? Thanks again for your work so far. |
I took a shot at finishing this one up. When I switch to using
When I try to print it from a simple ssl connect I get |
On Sun, Apr 26, 2015 at 12:22 PM, elitest [email protected] wrote:
"I disapprove of what you say, but I will defend to the death your right to |
We can probably close? These changes were (effectively) merged in #244 |
Note this requires pyca/cryptography#1619 to be merged first.