FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-118658: Modify cert generation script to extract cert3.pem by felixfontein · Pull Request #124599 · python/cpython · GitHub

/ cpython Public

gh-118658: Modify cert generation script to extract cert3.pem - #124599

Closed
felixfontein wants to merge 1 commit into
python:mainfrom
felixfontein:cert3-2
Closed

gh-118658: Modify cert generation script to extract cert3.pem#124599
felixfontein wants to merge 1 commit into
python:mainfrom
felixfontein:cert3-2

Conversation

felixfontein commented Sep 26, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

An alternative to #124598 that's simpler. The additional data in cert3.pem shouldn't affect the tests.

Edit: doesn't work since PEM_cert_to_DER_cert doesn't like PEM comments.

Copy link
Copy Markdown
Contributor Author

The additional data in cert3.pem shouldn't affect the tests.

Apparently it does:

ERROR: test_certificate_chain (test.test_ssl.TestPostHandshakeAuth.test_certificate_chain)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython/Lib/test/test_ssl.py", line 4707, in test_certificate_chain
    expected_ee_cert = ssl.PEM_cert_to_DER_cert(f.read())
  File "/home/runner/work/cpython/cpython/Lib/ssl.py", line 1498, in PEM_cert_to_DER_cert
    raise ValueError("Invalid PEM encoding; must start with %s"
                     % PEM_HEADER)
ValueError: Invalid PEM encoding; must start with -----BEGIN CERTIFICATE-----

So PEM_cert_to_DER_cert doesn't like PEM with comments. I guess in that case #124598 is preferable.

felixfontein marked this pull request as draft September 26, 2024 13:43
felixfontein deleted the cert3-2 branch September 26, 2024 18:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL