fix: Fix DeprecationWarning when setting ssl=True in remote()#2750
fix: Fix DeprecationWarning when setting ssl=True in remote()#2750tkukec wants to merge 2 commits into
Conversation
The current code initializes SSLContext with `ssl.PROTOCOL_TLSv1_2`, which has been deprecated for a while now This should be the correct fix according to the documentation (https://docs.python.org/3/library/ssl.html#ssl.SSLContext)
|
PROTOCOL_TLS_CLIENT enables certificate verification of the remote certificate. Python doesn't use the system certificate store by default as it seems. CERT_REQUIRED states that, use of this setting requires a valid set of CA certificates to be passed to SSLContext.load_verify_locations(). We need to call that with some CA store like |
|
Ah, makes sense actually. Should've tested it more before opening a PR. The stdlib does have The only thing that slightly worries me is this line in SSLContext.set_default_verify_paths (which gets called by both of the above):
Using the For your last point, I can see how a |
|
|
The current code initializes SSLContext with ssl.PROTOCOL_TLSv1_2, which has been deprecated since Python 3.6
This should be the correct fix, according to the documentation (https://docs.python.org/3/library/ssl.html#ssl.SSLContext)
New PR against the dev branch, following the maintainer notes left in #2748
Pwntools Pull Request
Thanks for contributing to Pwntools! Take a moment to look at
CONTRIBUTING.mdto make sure you're familiar with Pwntools development.Please provide a high-level explanation of what this pull request is for.
Testing
Pull Requests that introduce new code should try to add doctests for that code. See
TESTING.mdfor more information.Target Branch
Depending on what the PR is for, it needs to target a different branch.
You can always change the branch after you create the PR if it's against the wrong branch.
devdevstablestablebranchbetabetabranch, but notstabledevChangelog
After creating your Pull Request, please add and push a commit that updates the changelog for the appropriate branch.
You can look at the existing changelog for examples of how to do this.