Skip to content

Always add Net::SMTP.default_ssl_context#cert_store #1374

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

Closed
wants to merge 1 commit into from
Closed

Always add Net::SMTP.default_ssl_context#cert_store #1374

wants to merge 1 commit into from

Conversation

jdongelmans
Copy link

(Following up on an old PR (#1089)

I encountered the following error after setting ActionMailer::Base.smtp_settings#openssl_verify_mode to 'peer':

SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)

The way to fix this for me is manually setting the smtp_settings' ca_file, but the ca_file is an undocumented configuration parameter and thus not really clear to users.

I have now monkey patched my application with the change from this PR. Adding this as a default parameter does not harm the existing behaviour as far as I have found going through code and manual testing.

This avoids users having to add settings[:ca_path] or settings[:ca_file] manually if they set #verify_mode to 'peer'
This pull request was closed.
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