Skip to content
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 support for providing custom CA cert bundle #503

Merged
merged 2 commits into from
Nov 30, 2018

Conversation

ob-stripe
Copy link
Contributor

r? @brandur-stripe
cc @stripe/api-libraries

Add support for providing a custom CA bundle, by setting stripe.ca_bundle_path.

Fixes #501.

It's kind of difficult to write automated tests for this, but I've manually tested that this works with both RequestsClient and PycurlClient.

While I was at it, I also updated the embedded bundle to the latest version from https://curl.haxx.se/docs/caextract.html.

@brandur-stripe
Copy link
Contributor

Nice! LGTM. (And thanks for following the same naming convention as Stripe Ruby for ca_bundle_path.)

It looks like the PyPi build is having trouble, and I don't understand it exactly.:

  File "/home/travis/virtualenv/pypy3.5-5.8.0/site-packages/pipenv/_compat.py", line 66, in force_encoding
    from ctypes import pythonapi, py_object, c_char_p
ImportError: cannot import name 'pythonapi'
make: *** [init] Error 1

I restarted it, but it doesn't appear to be a transient problem because it failed again. Mind taking a look?

ptal @ob-stripe

@ob-stripe
Copy link
Contributor Author

@brandur-stripe It's a problem with pipenv itself. I submitted a fix (pypa/pipenv#3322) but they haven't released a new version yet.

@ob-stripe ob-stripe merged commit 7bf12f3 into master Nov 30, 2018
@ob-stripe ob-stripe deleted the ob-custom-cert-bundle branch November 30, 2018 17:32
@ob-stripe
Copy link
Contributor Author

Released as 2.15.0.

@brandur-stripe
Copy link
Contributor

Ah, I see! And wow — nice work on that pipenv patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants