-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
gh-118658: Modify cert generation script to extract cert3.pem #124598
Conversation
CC @kanavin I cannot really test this since the script doesn't work for me at all (it produces an invalid OpenSSL command line before reaching the part I modified), but I ran the code I added/modified manually and it seems to work. |
I have cherry-picked this. Sadly there are failures:
The generated cert3.pem looks like this:
|
I confirmed via #107594 that this fixes the problem. But you do need the above mentioned change, and the NEWS.d entry. |
@gpshead Do you still have the context for this in your head? :) |
Since the |
I don't think so, the CI check for that now passes. But this does need to be backported to 3.13. |
It's a a test-only change, so no NEWS entry is needed , and a backport can go in 3.13.1. |
Lib/test/certdata/make_ssl_certs.py
Outdated
@@ -266,6 +283,10 @@ def write_cert_reference(path): | |||
f.write(key) | |||
f.write(cert) | |||
|
|||
cert = extract_cert(cert, 0) |
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.
Instead of text manipulation, could we ask openssl to extract it?
As far as I can see, the incantation is:
openssl x509 -outform pem -in keycert3.pem -out cert3.pem
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.
Great idea! Implemented in 021af09.
Thanks @felixfontein for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, @felixfontein and @encukou, I could not cleanly backport this to
|
…3.pem (pythonGH-124598) (cherry picked from commit 480354d) Co-authored-by: Felix Fontein <[email protected]>
GH-124972 is a backport of this pull request to the 3.13 branch. |
This updates #118669 to extract the added file
cert3.pem
fromkeycert3.pem
.I'm not sure whether using the same issue number in the title is ok...