summaryrefslogtreecommitdiff
path: root/lib/net
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-15 13:27:53 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-15 13:27:53 +0000
commitedb7ec21dd7f913a5abfe27dfb8b2fba7d9178f6 (patch)
treea02d03ef4de4b39291b41fd4daf06f3e503972a8 /lib/net
parentb5aba69e60dec153ecab3263ebc3fa5e93662a46 (diff)
merge revision(s) 67563:
Support SNI (Reapplying r67488) This fixes connecting using TLS 1.3 to imap.gmail.com [Fix GH-2077] [Feature #15594] From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/imap.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index fa9b19071a..1c7e89ba14 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -1530,6 +1530,7 @@ module Net
end
@sock = SSLSocket.new(@sock, context)
@sock.sync_close = true
+ @sock.hostname = @host if @sock.respond_to? :hostname=
ssl_socket_connect(@sock, @open_timeout)
if context.verify_mode != VERIFY_NONE
@sock.post_connection_check(@host)