1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib
Jeremy Evans 7529c53891 [ruby/net-http] Do not set SNI hostname if connecting to IP address
RFC 6066, section 3, explicitly disallows the use of an IP address
as an SNI server name.  So check if the connection is being made
to an IP address using the resolv regexps, and do not set an SNI
hostname in that case.

Recent changes to LibreSSL make it more strictly follow RFC 6066,
resulting an s.hostname= raising an error if passed an IP address.
When such verions of LibreSSL are used, this change not only fixes
the net/http tests, it also fixes tests for webrick and open-uri,
which both make SSL connections to 127.0.0.1 using net/http in
their tests.

Avoid warning in the openssl extension by unsetting
@ssl_context.verify_hostname if connecting to an IP address.
Make changes so that the post_connection_check still happens
when connecting to an IP address, which is necessary to keep
checking that the certificate returned includes the IP address,
which one of the tests depends on.

Revert the previous change that modified the regexp used for
checking the error message.

https://github.com/ruby/net-http/commit/fa68e64bee
2022-02-03 05:10:21 +09:00
..
benchmark [ruby/benchmark] Freeze VERSION 2021-12-18 08:38:58 +09:00
bundler [rubygems/rubygems] Skip "seller shipped" notification after delivery 2022-02-01 20:07:18 +09:00
cgi [ruby/cgi] Extract CGI::Session#new_store_file 2021-12-15 08:24:41 +09:00
csv [ruby/csv] Revert "parser: fix a keep bug that some texts may be dropped unexpectedly" 2021-12-24 14:35:33 +09:00
delegate
did_you_mean Sync did_you_mean 2021-12-24 23:20:30 +09:00
drb lib/drb/drb.rb: Prevent a "warning: assigned but unused variable" 2022-01-17 14:56:11 +09:00
erb
error_highlight [ruby/error_highlight] Fix the spurious TypeError. 2022-01-04 23:09:01 +09:00
forwardable
getoptlong
irb [ruby/irb] Changed to call Kernel.print 2022-01-27 01:28:52 +09:00
logger [ruby/logger] Fix log rotation inter-process lock failed. 2022-01-27 12:33:06 +09:00
net [ruby/net-http] Do not set SNI hostname if connecting to IP address 2022-02-03 05:10:21 +09:00
observer
open3 Fixed filename for Open3::VERSION 2021-12-09 19:48:22 +09:00
optparse [ruby/optparse] Add rdoc options 2022-01-12 21:16:01 +09:00
ostruct
pstore
racc
random [ruby/securerandom] Use String#unpack1 2021-12-14 11:59:22 +09:00
rdoc [ruby/rdoc] Fix typo in RDoc::Task example 2022-01-24 10:17:16 +09:00
reline [ruby/reline] Add a comment for VK_MENU 2022-01-27 20:54:09 +09:00
rinda
rubygems [rubygems/rubygems] Remove encoding pragma from specification.rb 2022-02-01 05:20:38 +09:00
set
singleton
timeout
unicode_normalize
uri
weakref
yaml
abbrev.gemspec
abbrev.rb
base64.gemspec
base64.rb
benchmark.rb
bundler.rb Merge RubyGems-3.3.0 and Bundler-2.3.0 2021-12-21 15:27:05 +09:00
cgi.rb
csv.rb [ruby/csv] Add handling for ambiguous parsing options (https://github.com/ruby/csv/pull/226) 2021-12-24 14:35:33 +09:00
delegate.rb Kernel#=~: delete 2022-01-03 22:33:38 +09:00
did_you_mean.rb Sync did_you_mean 2021-12-24 23:20:30 +09:00
drb.rb
English.gemspec
English.rb
erb.gemspec
erb.rb [ruby/erb] Revert "Remove safe_level and further positional arguments (https://github.com/ruby/erb/pull/7)" 2022-01-17 12:39:17 -08:00
error_highlight.rb
fileutils.gemspec
fileutils.rb
find.gemspec
find.rb
forwardable.rb
getoptlong.rb
ipaddr.gemspec
ipaddr.rb
irb.rb [ruby/irb] Check colorize option correctly to clear char attr and don't use it for tests 2021-12-21 15:50:32 +09:00
logger.rb [ruby/logger] Fix log rotation inter-process lock failed. 2022-01-27 12:33:06 +09:00
mkmf.rb mkmf: unify duplicate code in pkg_config 2022-01-29 15:29:46 +09:00
mutex_m.gemspec
mutex_m.rb
observer.rb
open-uri.gemspec
open-uri.rb
open3.rb
optionparser.rb
optparse.rb [ruby/optparse] Fix links to the page directory files [Bug #18468] 2022-01-12 21:16:02 +09:00
ostruct.rb
pp.gemspec [ruby/pp] Bump version to 0.3.0 2021-12-20 12:44:31 +09:00
pp.rb [ruby/pp] [DOC] Update for PP.width_for [Feature #12913] 2021-12-23 18:00:56 +09:00
prettyprint.gemspec
prettyprint.rb
pstore.rb
racc.rb
rdoc.rb
readline.gemspec [ruby/readline] Bump version to 0.0.3 2021-12-24 17:54:09 +09:00
readline.rb
reline.rb [ruby/reline] Finalize when exception occurred 2021-12-21 00:49:03 +09:00
resolv-replace.gemspec
resolv-replace.rb
resolv.gemspec
resolv.rb [ruby/resolv] Support more characters in link local addresses 2022-01-12 10:49:57 +09:00
ruby2_keywords.gemspec
rubygems.rb [rubygems/rubygems] Rename Gem.open_with_flock to Gem.open_file 2022-01-20 06:45:28 +09:00
securerandom.gemspec [ruby/securerandom] Drop support for old ruby versions 2021-12-14 11:59:20 +09:00
securerandom.rb [ruby/securerandom] Split Random::Formatter from SecureRandom [Feature #18190] 2021-12-09 20:26:44 +09:00
set.rb
shellwords.gemspec
shellwords.rb
singleton.rb
tempfile.gemspec
tempfile.rb
time.gemspec
time.rb
timeout.rb
tmpdir.gemspec
tmpdir.rb
tsort.gemspec
tsort.rb
un.gemspec
un.rb
uri.rb
weakref.rb
yaml.rb [ruby/yaml] Add JRuby-specific warning when psych fails 2022-01-27 17:16:05 +09:00