-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add in some logic to select a CA bundle #10
Conversation
@erinn Thanks. I actually need to update I will try to do this later today. |
I sent a pull request for libcloud to allow an override, so you can pull it from there. I think I will expand the CA list given in security in libcloud and that should be about it. |
@erinn I've pushed a branch with a bunch of fixes - #11. I've decided to use In this new branch you can specify a path to a custom CA certificates bundle file by setting If there are no major objections to changes in the new branch and plan to merge it and push new version to PyPi in a day or two. |
Using requests is certainly a lot nicer than using urllib. However, it still ends up at the same place, I was trying to remove a value that has to be coded in, with something that looks in common locations for CA bundles and loads them if found. I would say that having the CA bundle found and loaded for you would be a great convenience, so the basic premise is still there. Let me know if you would like this done for your branch. However, my guess is that you prefer having the location set by hand. |
@erinn I'm fine with looking for CA bundle path in common places (excluding locations in home directory) and using the first bundle found. Is this what you had in mind or you want to do something else? |
Yep that is what I had in mind, you can easily take what I have above and put it into place in your branch. You will want to remove the last 3-6 lines in the list of possible locations (not sure how valuable windows locations would be) to fit your needs. As well as we were sort of discussing in libcloud using os.getenv may or may not be valuable. |
Added in f8187e8. Thanks! |
Just wanted to let you know that a new version with this and a bunch of other improvements and fixes has been published to PyPi - http://pypi.python.org/pypi/yubico/1.6.0 |
This was mainly inspired by https://github.com/google/signet, but I didn't think having to hard code in the path to the CA file was worth it, so I added in a check for the SSL_CERT_FILE environment variable and used a default set of locations to try and find the system CA bundle.