diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-15 10:52:34 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-15 10:52:34 +0000 |
commit | 246723a34ce5024e1d018cee4327dcce1bbd55c6 (patch) | |
tree | db957575abded1759b77d8bca597621b48591e54 /lib/net | |
parent | 3791bdf08084b40f0e6f499a83715639c7d25b1e (diff) |
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/trunk@67563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-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 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) |