-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
HTTPS Cert Checking #30
Comments
there are some patches/workarounds: http://stackoverflow.com/questions/1875052/using-paired-certificates-with-urllib2 |
Maybe we could have an empty list of PEMs as the default, and then just some methods like:
It also probably wouldn't be too hard to keep a small list of acceptable PEMs on file, and then do
Just some ideas to get the ball rolling. |
I'm thinking of having a default list of PEMs that the major browsers use and accept. The list can be extended/modified via
Will this suit everyone's needs? |
Yes, that would be perfect. On Tue, May 24, 2011 at 7:42 PM, kennethreitz <
|
Please can you make sure the default option is to use modssl's list of accepted certificates? |
The standard ssl module has something to help here, but only for Python 3.2+: http://docs.python.org/dev/library/ssl#ssl.SSLContext.set_default_verify_paths |
The more I think about this, the more I think it's a bad idea. If you look at httplib2, almost all of its issues are ssl-related. I'm not ruling it out yet, but maybe it's a bit out of scope for requests itself. There could easily be a Like I said, I'm just thinking out loud at this point. |
I wouldn't mind this as an external library, I just think it needs to exist in one form or another. I wouldn't mind you closing this with a "#wontfix" for being out of scope. |
Definitely want to add this in, but it will certainly be considered experimental for a while. |
In the meantime, is there a reasonable way to implement this in requests manually? I have a requirement that might force me to drop the whole library, i would hate that - and it would be a ton of work. (and thanks for the response, very glad to know it is coming! :) |
@JCWDev see eldarion/braintree_python@634f1f3#comments. I honestly don't think it will take much effort. I'll accept a working pull requests that fits this workflow as soon as it happens :) |
Perhaps I'm just tired, but reading the code linked above it appears to be validating the server certificate, but perhaps it is validating the server cert and host name against the client cert? I am just looking for a way to pass a client cert along with my request so that the receiving server can use it for identity check. Hopefully I'm making sense :) eg. |
I don't think the |
This just landed in urllib3. |
I'm planning on bundling a CA bundle. Unfortunately, Mozilla's is GPL. |
Requests v0.8.8 was just released that includes ssl verification! http://docs.python-requests.org/en/latest/user/advanced/#ssl-cert-verification |
v0.9.0 adds this by default. Enjoy. ✨ 🍰 ✨ |
<3 |
Awesome, thanks! |
Is there a way to provide client certificate (key file + cert file) for authorization purposes? |
@wlz you can provide any CA Bundle. |
@kennethreitz that is to check server cert against a CA bundle or i'm missing something? I've found traces of key/cert pair in packages, but not a mention of this in requests itself. Looks like there's some non-obvious way to actually pass client stuff to server as an auth token. |
How can I unsubscribe from this issue?! |
@cjw296: this pretty link: http://cl.ly/2U003k373O1L0b400y08 |
thanks :-) |
There, i fixed it™: https://gist.github.com/1710121 |
Response.raise_for_status()
The text was updated successfully, but these errors were encountered: