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 [ruby/delegate] gemspec: Drop unused executables directives 2021-10-22 19:48:22 +09:00
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 [ruby/racc] Fix a private method name 2021-11-04 08:58:45 +09:00
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 [ruby/rinda] Bump up rinda version to 0.1.1 2021-10-21 21:02:37 +09:00
rubygems [rubygems/rubygems] Remove encoding pragma from specification.rb 2022-02-01 05:20:38 +09:00
set [ruby/set] Bump the version to 1.0.2 2021-11-16 20:55:33 +09:00
singleton
timeout
unicode_normalize
uri [ruby/uri] URI#HTTP#origin and URI#HTTP#authority (https://github.com/ruby/uri/pull/30) 2021-10-22 19:48:36 +09:00
weakref
yaml [ruby/yaml] Bump up yaml version to 0.2.0 2021-10-14 20:16:04 +09:00
abbrev.gemspec
abbrev.rb
base64.gemspec [ruby/base64] Bump up base64 version to 0.1.1 2021-10-14 20:41:15 +09:00
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 [ruby/cgi] Bump version 2021-11-24 19:59:00 +09:00
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 [ruby/English] gemspec: Remove unused "executables" configuration 2021-12-09 19:28:53 +09:00
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 [ruby/fileutils] Bump up fileutils version to 1.6.0 2021-10-21 20:14:57 +09:00
find.gemspec [ruby/find] Bump up find version to 0.1.1 2021-10-14 20:26:15 +09:00
find.rb
forwardable.rb
getoptlong.rb
ipaddr.gemspec [ruby/ipaddr] Bump version to 1.2.3 2021-11-16 21:04:46 +09:00
ipaddr.rb [ruby/ipaddr] Fix include? and ipv4_mapped to allow drb tests to pass 2021-10-11 13:50:54 +09:00
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 [ruby/mutex_m] Make VERSION shareable 2021-10-22 19:49:34 +09:00
observer.rb
open-uri.gemspec [ruby/open-uri] gemspec: This gem exposes 0 executables 2021-12-09 19:28:54 +09:00
open-uri.rb
open3.rb [ruby/open3] Update to match JRuby 9.4 2021-12-09 19:28:54 +09:00
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 [ruby/ostruct] Bump version to 0.5.2 2021-12-08 14:47:46 -05:00
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 [ruby/prettyprint] Bump up prettyprint version to 0.1.1 2021-10-21 21:05:39 +09:00
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 [ruby/readline] Suppress constant redefinition warning 2021-11-29 18:50:27 +09:00
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 [ruby/tempfile] Bump up tempfile version to 0.1.2 2021-10-19 20:55:55 +09:00
tempfile.rb
time.gemspec [ruby/time] Bump up time version to 0.2.0 2021-10-14 21:14:35 +09:00
time.rb
timeout.rb [ruby/timeout] Bump up timeout version to 0.2.0 2021-10-14 20:12:29 +09:00
tmpdir.gemspec
tmpdir.rb [ruby/tmpdir] [DOC] Fix syntax in example code [ci skip] 2021-11-11 10:37:35 +09:00
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