sneako / finch

Elixir HTTP client, focused on performance
MIT License
1.23k stars 114 forks source link

Is it possible to bypass SSL verification? #253

Closed thbar closed 7 months ago

thbar commented 7 months ago

With Finch, is there a way (as a last resort in some dirty integration cases) to skip SSL verifications, like when using curl -k?

In particular, broken setups like SSL on top of IPs not registered in the cert, or self-signed certificates, are of particular interest to me :-)

I have done a quick bit of research and I am unsure if it is possible or not, especially after reading:

Thanks to anyone able to shed some light on this!

wojtekmach commented 7 months ago
{:ok, _} = Finch.start_link(name: :insecure, pools: %{default: [conn_opts: [transport_opts: [verify: :verify_none]]]})
{:ok, _} = Finch.build(:get, "https://github.com") |> Finch.request(:insecure)
sneako commented 7 months ago

Thanks for the example @wojtekmach !

thbar commented 7 months ago

Thank you @wojtekmach indeed! Much appreciated :-)