From c7318a6c03c1ecb3f574ccd2e3f06778687d1d15 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Thu, 27 Jun 2013 01:36:10 -0700 Subject: [PATCH] Always use an SSL context. [Fixes #548] This reverts commit 9890b197c51f1d340fa7275aa4bc17103746657b, as latest patch releases of 1.8.7 do accept an OpenSSL context object. This has been broken since the refactoring d6e25e5e37e6d591f94cc04a2a52c1128fde81db, which increased the scope of the original breakage. --- lib/mail/network/delivery_methods/smtp.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/mail/network/delivery_methods/smtp.rb b/lib/mail/network/delivery_methods/smtp.rb index 6904ef38f..b0af1f597 100644 --- a/lib/mail/network/delivery_methods/smtp.rb +++ b/lib/mail/network/delivery_methods/smtp.rb @@ -132,15 +132,11 @@ def ssl_context openssl_verify_mode = "OpenSSL::SSL::VERIFY_#{openssl_verify_mode.upcase}".constantize end - if RUBY_VERSION < '1.9.0' - openssl_verify_mode - else - context = Net::SMTP.default_ssl_context - context.verify_mode = openssl_verify_mode - context.ca_path = settings[:ca_path] if settings[:ca_path] - context.ca_file = settings[:ca_file] if settings[:ca_file] - context - end + context = Net::SMTP.default_ssl_context + context.verify_mode = openssl_verify_mode + context.ca_path = settings[:ca_path] if settings[:ca_path] + context.ca_file = settings[:ca_file] if settings[:ca_file] + context end end end