From: merch-redmine@jeremyevans.net
To: ruby-core@ruby-lang.org
Subject: [ruby-core:99403] [Ruby master Bug#10613] SNI is not optional when using TLS
Date: Thu, 30 Jul 2020 19:01:59 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-86851.20200730190158.8938@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-10613.20141217224806.8938@ruby-lang.org
Issue #10613 has been updated by jeremyevans0 (Jeremy Evans).
Status changed from Assigned to Closed
I think the need for this is handled by `Net::HTTP#ipaddr=`, which was added in Ruby 2.4.
----------------------------------------
Bug #10613: SNI is not optional when using TLS
https://bugs.ruby-lang.org/issues/10613#change-86851
* Author: edk750 (Eddy Kim)
* Status: Closed
* Priority: Normal
* Assignee: naruse (Yui NARUSE)
* ruby -v: 2.1
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
If ruby is using openssl with TLS extensions, and we attempt to connect to a server which supports TLS, but not SNI, the connection fails.
e.g.:
~~~Ruby
uri = URI.parse("https://example.com") # a server that supports TLSv1 but not the TLS extensions
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.ssl_version = :TLSv1
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
response = http.get(url)
~~~
~~~
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server hello B: parse tlsext
~~~
If I patch the `Net::HTTP#connect` method to not assign the hostname to the socket (s), we can avoid this error.
---Files--------------------------------
optional-sni.patch (1019 Bytes)
--
https://bugs.ruby-lang.org/
parent reply other threads:[~2020-07-30 19:02 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <redmine.issue-10613.20141217224806.8938@ruby-lang.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-86851.20200730190158.8938@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).