Merged
Conversation
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.
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.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?