aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTOMITA Masahiro <tommy@tmtm.org>2020-07-15 00:50:16 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-14 17:22:35 +0900
commit888e04ae05eb864756a43624888468617e39dd76 (patch)
treee8e5ac4c0555609348403ecfb89d55eda672717e /lib
parentcdb85142f9a0f2735ddb7544b5460809347a147a (diff)
downloadruby-888e04ae05eb864756a43624888468617e39dd76.tar.gz
[ruby/net-smtp] TLS should not check the host name by default.
In tlsconnect(), the host name is checked when @ssl_context.verify_mode is not OpenSSL::SSL::VERIFY_NONE, but the verify_mode of @ssl_context generated by default is nil. https://github.com/ruby/net-smtp/commit/bde75a15b5
Diffstat (limited to 'lib')
-rw-r--r--lib/net/smtp.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb
index f8121cd44f..52c5d813eb 100644
--- a/lib/net/smtp.rb
+++ b/lib/net/smtp.rb
@@ -583,7 +583,7 @@ module Net
logging "TLS connection started"
s.sync_close = true
ssl_socket_connect(s, @open_timeout)
- if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
+ if @ssl_context.verify_mode && @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
s.post_connection_check(@address)
end
verified = true