diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-07-31 14:02:50 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-07-31 14:02:50 +0000 |
commit | 402bf6d516ac80e7ce1f58660086962231acf425 (patch) | |
tree | 962f7be0ac6a39b78cd1eb0b00ffc4d3227bbfe8 /lib/net/imap.rb | |
parent | 39ee412b14cbd60e108a2de62715c254f41f6bb2 (diff) |
merge revision(s) 67563: [Backport #15769]
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_5@67717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/imap.rb')
-rw-r--r-- | lib/net/imap.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/net/imap.rb b/lib/net/imap.rb index 7db9c7a27e..da7d0d555c 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -1528,6 +1528,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) |