slack-ruby / slack-ruby-client

A Ruby and command-line client for the Slack Web, Real Time Messaging and Event APIs.
MIT License
1.19k stars 215 forks source link

SSL Error on Heroku-22: SSL_CTX_load_verify_file: system lib #415

Closed irphilli closed 1 year ago

irphilli commented 2 years ago

On Heroku-22 (based on Ubuntu 22), I get the following error when trying to use the client:

SSL_CTX_load_verify_file: system lib

Something as simple as this causes the error:

Slack::Web::Client.new(token: 'abc').auth_test

Doing the following is a workaround:

Slack::Web::Client.new(token: 'abc', ca_file: nil, ca_path: nil).auth_test

Looking at the source, it looks like the gem is defaulting to OpenSSL::X509::DEFAULT_CERT_FILE and OpenSSL::X509::DEFAULT_CERT_DIR. On Heroku-22, at least, these paths aren't valid.

Any reason for defaulting to those, as opposed to nil? (i.e. let OpenSSL figure out the paths).

dblock commented 2 years ago

No good reason AFAIK. I say we either document it or change it with a major version bump. Care to PR either?