Skip to content
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

Fix x509 tests by using trustme #335

Closed
wants to merge 2 commits into from

Conversation

pquentin
Copy link
Contributor

This way the certificate won't be able to expire anymore and we won't have to store a blob in git. trustme only supports PEM, not DER, which is why test_x509_der has to re-export the certificate and key to DER.

Additionally, since trustme does not support password-protected keys, the re-export was the perfect place to add a password, so test_x509_der also tests the password case, while it was test_x509_pem until now.

The tests are still not end-to-end, we're just running the x509.py code without actually establishing a TLS connection. This could be fixed at a later point, but is considered out of scope here as that would be a new feature.

@achapkowski @sethmlarson @sigmavirus24 Can you please take a look?

This way the certificate won't be able to expire anymore and we won't
have to store a blob in git. trustme only supports PEM, not DER, which
is why test_x509_der has to re-export the certificate and key to DER.

Additionally, since trustme does not support password-protected keys,
the re-export was the perfect place to add a password, so test_x509_der
also tests the password case, while it was test_x509_pem until now.

The tests are still not end-to-end, we're just running the x509.py code
without actually establishing a TLS connection. This could be fixed at a
later point, but is considered out of scope here as that would be a new
feature.
@pquentin pquentin self-assigned this Oct 24, 2022
@achapkowski
Copy link

Since we are fixing tests, can you drop the Python 2.7 tests and actions?

@pquentin
Copy link
Contributor Author

pquentin commented Oct 24, 2022

As mentioned in #334, removing Python 2.7 should be done, but in my opinion it should be done in a separate pull request since it's a non-trivial effort to do correctly.

@bmwiedemann
Copy link

Worth noting that current trustme stops working in 2038: python-trio/trustme#42

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.

None yet

3 participants