[前][次][番号順一覧][スレッド一覧]

ruby-changes:63207

From: nagachika <ko1@a...>
Date: Wed, 30 Sep 2020 07:50:24 +0900 (JST)
Subject: [ruby-changes:63207] ea347990a5 (ruby_2_7): merge revision(s) 07786edd66f59a529d6febb2e0fe901782991755,1917afa34bca55ba1ea578234132b7e4479ea3c9,0c611d7f4fce67c64bee4815f263c55ef15561c4:

https://git.ruby-lang.org/ruby.git/commit/?id=ea347990a5

From ea347990a5416c73a74f7dfa8a13b5ad5b7e79d4 Mon Sep 17 00:00:00 2001
From: nagachika <nagachika@r...>
Date: Wed, 30 Sep 2020 07:50:06 +0900
Subject: merge revision(s)
 07786edd66f59a529d6febb2e0fe901782991755,1917afa34bca55ba1ea578234132b7e4479ea3c9,0c611d7f4fce67c64bee4815f263c55ef15561c4:

	test/net/http/test_https.rb: Stop the error due to openssl 1.1.1h

	On some environments that uses OpenSSL 1.1.1h, the two tests now fail.

	http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200924T062352Z.fail.html.gz
	https://github.com/ruby/ruby/runs/1159288773?check_suite_focus=true

	```
	  1) Failure:
	TestNetHTTPS#test_get [/data/data/com.termux/files/home/cb/tmp/build/20200924T062352Z/ruby/test/net/http/test_https.rb:47]:
	<"0\x82\x03\xED0\x82\x02\xD5\xA0\x03..."> expected but was
	<"0\x82\x03\xE30\x82\x02\xCB\xA0\x03...">.
	```

	Not sure why, but verify_callback now seems to receive only SERVER_CERT
	but not CA_CERT.
	It would be good to investigate the issue furthermore, but tentatively,
	I want to stop the failures.

	test/net/http/test_https.rb: the order of verify_callback seems to
	 vary

	... depending upon the environment.

	test/net/http/test_https.rb: The test logic was buggy

	The expected certs must be `[CA_CERT, SERVER_CERT]` before 1.1.1g and
	`[SERVER_CERT]` after 1.1.1h.

diff --git a/test/net/http/test_https.rb b/test/net/http/test_https.rb
index 17fabb6..a501222 100644
--- a/test/net/http/test_https.rb
+++ b/test/net/http/test_https.rb
@@ -44,8 +44,10 @@ class TestNetHTTPS < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/net/http/test_https.rb#L44
     http.request_get("/") {|res|
       assert_equal($test_net_http_data, res.body)
     }
-    assert_equal(CA_CERT.to_der, certs[0].to_der)
-    assert_equal(SERVER_CERT.to_der, certs[1].to_der)
+    # TODO: OpenSSL 1.1.1h seems to yield only SERVER_CERT; need to check the incompatibility
+    certs.zip([CA_CERT, SERVER_CERT][-certs.size..]) do |actual, expected|
+      assert_equal(expected.to_der, actual.to_der)
+    end
   rescue SystemCallError
     skip $!
   end
@@ -63,8 +65,10 @@ class TestNetHTTPS < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/net/http/test_https.rb#L65
     http.request_get("/") {|res|
       assert_equal($test_net_http_data, res.body)
     }
-    assert_equal(CA_CERT.to_der, certs[0].to_der)
-    assert_equal(SERVER_CERT.to_der, certs[1].to_der)
+    # TODO: OpenSSL 1.1.1h seems to yield only SERVER_CERT; need to check the incompatibility
+    certs.zip([CA_CERT, SERVER_CERT][-certs.size..]) do |actual, expected|
+      assert_equal(expected.to_der, actual.to_der)
+    end
   end
 
   def test_get_SNI_proxy
diff --git a/version.h b/version.h
index d578e36..d3a3638 100644
--- a/version.h
+++ b/version.h
@@ -2,11 +2,11 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L2
 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
 #define RUBY_VERSION_TEENY 1
 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
-#define RUBY_PATCHLEVEL 131
+#define RUBY_PATCHLEVEL 132
 
 #define RUBY_RELEASE_YEAR 2020
 #define RUBY_RELEASE_MONTH 9
-#define RUBY_RELEASE_DAY 29
+#define RUBY_RELEASE_DAY 30
 
 #include "ruby/version.h"
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]