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

Downloader: use truststore for system cert trust when available #1177

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

Rotonen
Copy link
Contributor

@Rotonen Rotonen commented Sep 13, 2024

Now with the proxy support, one can easily hit resigning proxies with the model downloader, and naturally certifi does not come with support or a way to inject support for arbitrary PKI solutions.

Truststore is an elegant way around this problem, it lets one trust the system certificate store instead of certifi: https://pypi.org/project/truststore/

I find the "just capture all things TLS" pattern the neatest if truststore is installed, but I'm open for debate on the implementation details.

https://truststore.readthedocs.io/en/latest/index.html#using-truststore-with-aiohttp

@Acly Acly merged commit 044be26 into Acly:main Sep 17, 2024
1 of 2 checks passed
@Acly
Copy link
Owner

Acly commented Sep 17, 2024

Thanks! truststore seems like it would have solved a lot of headaches if it was the default...

@Rotonen
Copy link
Contributor Author

Rotonen commented Sep 19, 2024

Yes, the whole http-in-python ecosystem has a long and varied history of stubbornness around the topic of trusting arbitrary PKI.

And sorry, was not aware of the formatting rules on the repo. Should I put forth a further PR to flip that bulid green?

@Acly
Copy link
Owner

Acly commented Sep 19, 2024

I added the new-lines after merge, so all good.

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

Successfully merging this pull request may close these issues.

2 participants