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
Allow the CA certificate data to be passed as a string. #1804
Conversation
Previous version was't setting attributes on VerifiedHTTPSConnection.
Doesn't urllib3 allow users to pass their own SSLContext? |
It does but that's not what requests appears to do. Do you feel that it should? |
I think you can define your own |
Actually at the moment you can't even import requests as it calls |
I understand that |
PyOxidizer does not set |
This should make it easier to use cadata from requests though. I'll let one of the real maintainers here approve/provide feedback but otherwise this looks good to me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, thank you for a very high-quality PR. Also thanks to @sigmavirus24 for handling 95% of this PR. :)
Also TIL about PyOxidizer not having access to packages at a filesystem level. That's becoming a requirement for more Python-related tasks it seems eg PyOxidizer, Py2EXE, etc. Maybe needs to be an effort to try loading certifi via certifi.contents()
in Requests if certifi.where()
fails?
There are some circumstances where we may want to pass the PEM-encoded certificates directly to the SSLContext rather than passing a file or directory. This just plums
SSLContext.load_verify_locations()
'scadata
parameter through to places where it can be reached.