Skip to content

Commit

Permalink
Support SNI (Reapplying r67488)
Browse files Browse the repository at this point in the history
This fixes connecting using TLS 1.3 to imap.gmail.com

[Fix rubyGH-2077] [Feature #15594]

From: Marc-Antoine Perennou <[email protected]>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
knu committed Apr 15, 2019
1 parent 3791bdf commit 246723a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/net/imap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1530,6 +1530,7 @@ def start_tls_session(params = {})
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)
Expand Down

0 comments on commit 246723a

Please sign in to comment.