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 urllib3 warning #336

Merged
merged 5 commits into from Oct 24, 2022
Merged

Fix urllib3 warning #336

merged 5 commits into from Oct 24, 2022

Conversation

pquentin
Copy link
Contributor

This will fix the warning for urllib3 1.26.x. To support urllib3 2.x we will need to vendor PyOpenSSLContext instead.

This builds on top of #335 but can also be merged directly if we prefer.

Resolves #331, Closes #335

@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.
This will fix the warning for urllib3 1.26.x. To support urllib3
2.x we will need to vendor PyOpenSSLContext instead.
@pquentin pquentin self-assigned this Oct 24, 2022
There is no point in adapting that test since importing adapters.x509
already requires pyOpenSSL. However, the noopenssl tox configuration is
still useful as we want to make sure the rest of the test suite does run
without pyOpenSSL.
Copy link

@achapkowski achapkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

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.

Remove import from deprecated urllib3.contrib.pyopenssl
2 participants