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

How pass ssl options to hackney/httpoison? #565

Closed
Fudoshiki opened this issue Nov 29, 2020 · 1 comment
Closed

How pass ssl options to hackney/httpoison? #565

Fudoshiki opened this issue Nov 29, 2020 · 1 comment

Comments

@Fudoshiki
Copy link

Related to benoitc/hackney#664

To fix this

[info] TLS :client: In state :wait_cert_cr at ssl_handshake.erl:1952 generated CLIENT ALERT: Fatal - Handshake Failure
 - {:bad_cert, :hostname_check_failed}
[error] Task #PID<0.734.0> started from #PID<0.730.0> terminating
** (Bamboo.GmailAdapter.Errors.TokenError) Error retrieving access token

More info:
[message: %HTTPoison.Error{id: nil, reason: {:tls_alert, {:handshake_failure, 'TLS client: In state wait_cert_cr at ssl_handshake.erl:1952 generated CLIENT ALERT: Fatal - Handshake Failure\n {bad_cert,hostname_check_failed}'}}}]

    (bamboo_gmail 0.2.0) lib/bamboo/adapters/gmail_adapter.ex:205: Bamboo.GmailAdapter.handle_error/2
    (bamboo_gmail 0.2.0) lib/bamboo/adapters/gmail_adapter.ex:85: Bamboo.GmailAdapter.handle_dispatch/2
    (elixir 1.12.0-dev) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
    (stdlib 3.13.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Function: #Function<0.81838663/0 in Bamboo.TaskSupervisorStrategy.deliver_later/3>
    Args: []
@hfjallemark
Copy link
Contributor

I was able to get it working with this adapter configuration:

hackney_opts: [
  ssl_options: [{:versions, [:"tlsv1.2"]}]
]

FYI I am running macOS Big Sur on M1.. seems like the issue occurs with one of those or both.

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

No branches or pull requests

2 participants