Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-118658: Return consistent types from get_un/verified_chain in SSLObject and SSLSocket#118669
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
matiuszka commented May 6, 2024 • edited by bedevere-app bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-app bot
Uh oh!
There was an error while loading. Please reload this page.
matiuszka commented May 6, 2024
I restored my old branch from which I created the original PR #109113. There is one file missing about NEWS, I am not sure if that was removed on purpose or not. |
sethmlarson left a comment
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.
Seems good to me, since these methods are now documented would it make sense to have a test case?
matiuszka commented May 22, 2024
Why not, it will not hurt. I will add it. |
felixfontein commented Jul 9, 2024
@matiuszka do you plan to add the test cases soon? I would love to see this PR merged. |
matiuszka commented Jul 10, 2024
Sorry, I forgot about this issue. I will be available next week, so probably next Monday I will have it ready. |
matiuszka commented Jul 17, 2024
@sethmlarson, @felixfontein I tried to write tests for it but I am not sure how to start. There are no tests for the SSL module, so there is nothing that I can use to start. I would need a boilerplate code to see how to execute such a test. |
matiuszka commented Aug 14, 2024
@felixfontein I applied your remarks. |
felixfontein left a comment
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.
From my POV this is ready to go. (I have no idea who actually has to approve/merge this though, and how to get it backported to 3.13...)
sethmlarson left a comment • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
Thanks for this, LGTM. I'm not a core developer so can't merge this myself, unfortunately.
sethmlarson commented Aug 14, 2024
As far as backporting to 3.13, I'll tag in @Yhg1s. The gist is that this API solidified, but didn't get applied to both places where peer certificates can be fetched. Not backporting this will be confusing to other Python implementations which will start implementing the API now that it's public in 3.13 and potentially leave the APIs in a strange place wrt backwards compatibility. There are only two projects which used these APIs that I'm aware of prior to their public availability and they both should be robust to a backport of this API. |
felixfontein commented Aug 14, 2024
Thanks @matiuszka for the PR, and @Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
… in `SSLObject` and `SSLSocket` (pythonGH-118669) (cherry picked from commit 8ef358d) Co-authored-by: Mateusz Nowak <nowak.mateusz@hotmail.com> Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
GH-123082 is a backport of this pull request to the 3.13 branch. |
…` in `SSLObject` and `SSLSocket` (GH-118669) (#123082) gh-118658: Return consistent types from `get_un/verified_chain` in `SSLObject` and `SSLSocket` (GH-118669) (cherry picked from commit 8ef358d) Co-authored-by: Mateusz Nowak <nowak.mateusz@hotmail.com> Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
… in `SSLObject` and `SSLSocket` (python#118669) Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
… in `SSLObject` and `SSLSocket` (python#118669) Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
kanavin commented Sep 26, 2024
Sadly, I think this has to be reverted, as it broke certificate generation script, and doesn't contain any other way to generate cert3.pem: Alternatively, you need to produce a fix to that script that includes correct regeneration of cert3.pem. |
…d_chain` in `SSLObject` and `SSLSocket` (python#118669)" This reverts commit 8ef358d.
felixfontein commented Sep 26, 2024
@kanavin how about simply disabling the broken test instead of reverting the whole PR? It would be pretty sad if the interface would be re-broken by reverting this. |
felixfontein commented Sep 26, 2024
I looked at the certs; |
felixfontein commented Sep 26, 2024
#124598 should fix Lib/test/certdata/make_ssl_certs.py to extract cert3.pem from keycert3.pem. |
felixfontein commented Sep 26, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
|
Fixses inconsistent return types between
SSLObjectandSSLSocketas described ingh-118656