Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: need to add a way to override the SSL verify context through the clie... #400

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

Open
cmosguy wants to merge 2 commits into apify:master
base: master
Choose a base branch
Loading
from cmosguy:ssl_verify

Conversation

@cmosguy
Copy link

@cmosguy cmosguy commented May 12, 2025

We need a way to pass in the a context to the httpx client library so that we can manage the untreated certs.

The only way to do this is by following the recommendation here:

https://www.python-httpx.org/advanced/ssl/

All this fixes the issue to work around the error:

httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)

@cmosguy cmosguy changed the title (削除) need to add a way to override the SSL verify context through the clie... (削除ここまで) (追記) feat: need to add a way to override the SSL verify context through the clie... (追記ここまで) May 12, 2025
Copy link
Contributor

Pijukatel commented May 14, 2025
edited
Loading

Maybe we should rather allow passing custom http client to the ApifyClientAsync, ApifyClient init methods?
What do you think @janbuchar , @vdusek ?

vdusek reacted with thumbs up emoji cmosguy reacted with eyes emoji

Copy link
Contributor

Maybe we should rather allow passing custom http client to the ApifyClientAsync, ApifyClient init methods? What do you think @janbuchar , @vdusek ?

Maybe 🤷 However, we would have to change up the _BaseHTTPClient a bit so that we wouldn't need to pass both the sync and async version to it as that would be super unwieldy.

But, first of all... where did you get this error @cmosguy? I don't see a reason for api.apify.com to have an expired certificate. Can you show us a reproduction?

vdusek reacted with thumbs up emoji

Copy link
Author

cmosguy commented May 17, 2025

Maybe we should rather allow passing custom http client to the ApifyClientAsync, ApifyClient init methods? What do you think @janbuchar , @vdusek ?

Maybe 🤷 However, we would have to change up the _BaseHTTPClient a bit so that we wouldn't need to pass both the sync and async version to it as that would be super unwieldy.

But, first of all... where did you get this error @cmosguy? I don't see a reason for api.apify.com to have an expired certificate. Can you show us a reproduction?

Hey @janbuchar I am using my own laptop with MacOS and have no idea really how to resolve or get around this. It is not a laptop I setup, it was given to me. I do have Zscaler installed, but I am not sure if that matters. Any solution you can provide to the client so that we can inject new context to override the SSL would be great. Unless you have other ideas.

Copy link
Contributor

Pijukatel commented May 19, 2025
edited
Loading

Hello, @cmosguy we had internal discussion about this and agreed to allow passing a custom http client to ApifyClientAsync, ApifyClient init methods, which will allow you to pass your specifically configured client to solve your use case.

Do you feel comfortable with creating such PR?

The other possibility is that our team will eventually do it, but it will take more time as we have other work planned for the near future.

vdusek reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /