Skip to content

allow providing a custom certificate store #297

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bdegomme
Copy link

@bdegomme bdegomme commented Apr 24, 2025

I recently has an issue with a customer having a valid certificate chain, but nevertheless the viewpoint gem raised error certificate verify failed (unable to get local issuer certificate) (OpenSSL::SSL::SSLError) when trying to access their server. Their certificate was generated with Let's Encrypt.

I fixed this error by providing the default certificate store for use by EWSClient, like this

cert_store = OpenSSL::X509::Store.new
cert_store.set_default_paths
Viewpoint::EWSClient.new(url, username, password, http_opts: { cert_store: })

I'm not sure why Viewpoint doesn't use the system certificate store by default, and there may be a more elegant fix to this, but I thought I would put this out there.

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

Successfully merging this pull request may close these issues.

1 participant