summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornicholas a. evans <nick@ekenosen.net>2019-02-27 14:25:51 -0500
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-14 17:26:36 +0900
commitf1d32010e6e263ae94ee480a0d537727e91485ed (patch)
treed6e00186bf99275cf5ba0715db7686db2c0aa673 /lib
parent141404e898b7320682d4ac83e47fc53642d031bd (diff)
[ruby/net-smtp] Add SNI support to net/smtp
https://github.com/ruby/net-smtp/commit/b706942392
Diffstat (limited to 'lib')
-rw-r--r--lib/net/smtp.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb
index a195f2664d..810da77df4 100644
--- a/lib/net/smtp.rb
+++ b/lib/net/smtp.rb
@@ -600,6 +600,7 @@ module Net
s = ssl_socket(s, @ssl_context)
logging "TLS connection started"
s.sync_close = true
+ s.hostname = @address if s.respond_to? :hostname=
ssl_socket_connect(s, @open_timeout)
if @ssl_context.verify_mode && @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE
s.post_connection_check(@address)