ryanwinchester / tmi.ex

Twitch Messaging Interface for Elixir.
Apache License 2.0
44 stars 7 forks source link

OTP 26 not supported #20

Closed tuomohopia closed 8 months ago

tuomohopia commented 1 year ago

Erlang's OTP 26 introduced some breaking changes to the ssl library. Using tmi.ex with OTP 26 now fails to connect due to incompatible default options passed in to :ssl.connect/3 that ExIRC wraps with its ExIRC.Client.Transport.connect/4.

In practice, from OTP 26 onwards :ssl connect verify option now defaults to :verify_peer instead of :verify_none which due to missing CA certificates causes connecting to fail.

The solution to support OTP 26 here could be something like adding verify: :verify_none as the last argument to: https://github.com/ryanwinchester/tmi.ex/blob/61ab7c88ef12efa864f3874317ca2dd3c7b51620/lib/tmi/client.ex#L87

A more comprehensive solution would be adding support to fetch certificates upon connecting.

More info: https://www.erlang.org/blog/otp-26-highlights/#ssl-improved-checking-of-options

tuomohopia commented 1 year ago

I opened a placeholder for the solution https://github.com/ryanwinchester/tmi.ex/pull/21