This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Key agreement parameters not accessible
Type: enhancement Stage: needs patch
Components: SSL Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder: Improve OpenSSL ECDH support
View: 32858
Assigned To: christian.heimes Nosy List: christian.heimes, sruester
Priority: normal Keywords:

Created on 2018-02-20 09:58 by sruester, last changed 2022-04-11 14:58 by admin.

Messages (3)
msg312406 - (view) Author: sruester (sruester) * Date: 2018-02-20 09:58
Using python it is not possible to retrieve information about the key exchange/agreement method that was used during session setup.

A method should be added to a suitable SSL* object that allows to retrieve information such as whether ECDH with which curves, or DH, or neither was used.
msg312409 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2018-02-20 10:16
I'd prefer to have a generic handshake info method that returns a structured object like a named tuple with handshake information. We could start with key exchange / key agreement, TLS version, cipher suite, etc. Later the method could be extended and include information such as signature algorithms, offered suites and versions (server-side), and more.
msg312417 - (view) Author: sruester (sruester) * Date: 2018-02-20 13:47
How about a new method crypto_information() and making cipher() a wrapper around that one? The former could return a named tupple with handshake information together with all other relevant crypto information about the current session.

This would eliminate the need to define several new methods while keeping backwards compatibility of cipher().
History
Date User Action Args
2022-04-11 14:58:58adminsetgithub: 77064
2018-02-26 08:45:35christian.heimessetstage: needs patch
versions: + Python 3.8
2018-02-20 13:47:47sruestersetmessages: + msg312417
2018-02-20 10:16:07christian.heimessetsuperseder: Improve OpenSSL ECDH support
messages: + msg312409
2018-02-20 09:58:42sruestercreate