edgurgel/httpoison

Unknown CA error with HTTPoison 0.7

Closed this issue · 8 comments

iex(1)> HTTPoison.get("https://app.promoter.io")
[error] SSL: :certify: ssl_handshake.erl:1401:Fatal error: unknown ca

{:error, %HTTPoison.Error{id: nil, reason: {:tls_alert, 'unknown ca'}}}

Tested on Erlang 17.5 and 18, with the same effect. Works fine in HTTPotion, though.

It's probably related to this issue here: benoitc/hackney#215

Yeah, that could be it. I wonder what's the resolution going to be.

@jakubpawlowicz could you try overriding hackney dependency to:

  `{:hackney, github: "benoitc/hackney", tag: "1.3.0"},`

👍 that works now, except I had to override it:

{:hackney, github: "benoitc/hackney", tag: "1.3.0", override: true}

Great! As soon as the hackney 1.3.0 gets released I will update HTTPoison and release a new minor version.

DavsX commented

Just a heads up (don't know if I should open an issue for this or not): using proxy with hackney 1.2.0 is not working as it does not export the hackney_connect.ssl_opts/2 function. It is fixed in 1.3.0, so the solution described by @jakubpawlowicz should be used.

HTTPoison 0.7.1 will require ~> 1.3.0 hackney https://github.com/edgurgel/httpoison/releases/tag/v0.7.1

Thanks again, guys!

Thank you!