gh-150898: Assume OpenSSL supports keylogging#150870
Conversation
Since version 3.10, CPython requires OpenSSL 1.1.1 or higher. Therefore, support for keylogging can be assumed.
Documentation build overview
20 files changed ·
|
|
Yes please create an issue and a NEWS entry. I will not backport this though. |
|
Issue created and linked. For the news-entry, I'm not so sure what to put in there. Nothing of this really concerns the user (besides the docs). https://devguide.python.org/getting-started/pull-request-lifecycle/#updating-news-and-what-s-new-in-python says about this:
This PR is exactly all of those 3. I've drafted a news entry anyway. Let me know what you think. |
|
I would prefer having it for those who use an alternative implementation, just in case. Idk if all AWS-LC versions support this or if BoringSSL does. So for a NEWS entry, just say that it is now unconditionally assumed to exist. |
|
@picnixz I think I've addressed all comments. If you have time, I'd appreciate a review. |
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
| @@ -0,0 +1 @@ | |||
| Unconditionally assume :attr:`ssl.SSLContext.keylog_filename` exists. | |||
There was a problem hiding this comment.
I don't think that a NEWS entry is needed, you can remove it. The change doesn't impact users.
There was a problem hiding this comment.
I added it specifically as requested by @picnixz (#150870 (comment))
I'd like to wait for his input on this thread before removing it again 😇
There was a problem hiding this comment.
I'd prefer that we keep it, so that surprises know when it was changed. I'm also afraid of hunting regressions when there are OpenSSL forks involved for instance.
Co-authored-by: Victor Stinner <vstinner@python.org>
Since version 3.10, CPython requires OpenSSL 1.1.1 or higher.
Therefore, support for keylogging is always available.
Initially I was confused by the docs for
create_default_contextstatingbut the docs for
keylog_filenamenot mentioning why or how it could beunsupported.
Looking at the C code also confirms that
keylog_filenameis always defined:cpython/Modules/_ssl.c
Lines 5733 to 5734 in 7a468a1
vs in 3.9 where it was not always present:
cpython/Modules/_ssl.c
Lines 4891 to 4894 in 0bbaf5d
Closes: gh-150898