elixir-mint / mint

Functional HTTP client for Elixir with support for HTTP/1 and HTTP/2 🌱
Apache License 2.0
1.37k stars 112 forks source link

Default to using Erlang certificates store #435

Closed josevalim closed 5 months ago

josevalim commented 5 months ago

The OTP team no longer supports Erlang versions earlier than 25+, so we can assuming that :public_key.cacerts_get/0 is available and only fallback to CAStore if not.

This also solves a bug in that Req/Finch/Mint do not work inside escripts by default (because inside an escript you cannot access the priv dir of an application).

josevalim commented 5 months ago

It would be fantastic to get a new minor version with this change to address this: https://github.com/livebook-dev/livebook/issues/2642

But we can also depend on main if merged. :)

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 31c9a714a5baa02dcdec2221fc6004efd62571d6-PR-435

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/mint/core/transport/ssl.ex 2 4 50.0%
<!-- Total: 2 4 50.0% -->
Files with Coverage Reduction New Missed Lines %
lib/mint/core/transport/ssl.ex 1 85.82%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build f83b897ec3808cd871fa83140ac9d8aa5169b4c6: -0.2%
Covered Lines: 1276
Relevant Lines: 1457

💛 - Coveralls
coveralls commented 5 months ago

Pull Request Test Coverage Report for Build eeb0c17dfbb5c461ce3bb6ae4669a1823da84362-PR-435

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/mint/core/transport/ssl.ex 2 4 50.0%
<!-- Total: 2 4 50.0% -->
Files with Coverage Reduction New Missed Lines %
lib/mint/core/transport/ssl.ex 1 85.82%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build f83b897ec3808cd871fa83140ac9d8aa5169b4c6: -0.2%
Covered Lines: 1276
Relevant Lines: 1457

💛 - Coveralls
whatyouhide commented 5 months ago

@josevalim 1.6.1 is out 🙃

wojtekmach commented 5 months ago

@whatyouhide v1.6.1 is out on GitHub but looks like not yet on Hex!

wojtekmach commented 5 months ago

Thanks! I'm updating Finch accordingly: https://github.com/sneako/finch/pull/274.