-
-
Notifications
You must be signed in to change notification settings - Fork 338
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 Certifi support for websockets #69
Comments
P.S. I'm willing to submit the PR if you're open to the idea, just let me know what route you would prefer. |
What symptoms are you encountering? Are you finding the websocket doesn't create a connection or downgrades to not using TLS? Also, I could use some more context on this, but it feels like a useful contribution and I'm happy to review a PR. |
The context is: slackapi/python-slack-sdk#334. Basically, the cert bundle which is used by the websockets library on Mac doesn't have the requisite root certificate for me. So, you get an error like:
My suggestion is that we allow users to pass a custom ssl_context on creation of StreamClient. |
The websockets client on OS X doesn't include a full set of root certificates to be completely useful. This allows users to supply their own ssl_context object that the websockets function can use. Solves issue: alexgolec#69
The websockets client on OS X doesn't include a full set of root certificates to be completely useful. This allows users to supply their own ssl_context object that the websockets function can use. Solves issue: alexgolec#69
The websockets client on OS X doesn't include a full set of root certificates to be completely useful. This allows users to supply their own ssl_context object that the websockets function can use. Solves issue: alexgolec#69
The following command worked for me "/Applications/Python\ 3.8/Install\ Certificates.command" |
Yeah tried this, and I am still experiencing the error |
Is your feature request related to a problem? Please describe.
If you're on OS X, the default SSL library that the websockets client uses doesn't have a cert for the TD Ameritrade streaming endpoint.
Describe the solution you'd like
Instead of using the default store, use certifi. Code wise, this looks something like:
Additional context
We can alternatively use certitude for OS X users: https://github.com/python-hyper/certitude and explain to people how to load their stuff into the cert chain.
My suggestion is just make it so you can pass a custom SSL context to
StreamClient
.The text was updated successfully, but these errors were encountered: