summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-17 15:34:06 (GMT)
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-17 15:34:06 (GMT)
commit556e9f726e2b80f6088982c6b43abfe68bfad591 (patch)
tree1c86d1e138d47fb9339c8e7fd7542e66ac19daae
parentb18c513e24dad5f464701a4ad49ac699f435bbbe (diff)
* ext/openssl: backport changes from openssl 2.1.2.ruby_2_3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@65135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--ext/openssl/ossl_x509name.c2
-rw-r--r--test/openssl/test_x509name.rb14
-rw-r--r--version.h4
4 files changed, 17 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d86dd5..9af06ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Oct 18 00:33:13 2018 Kazuki Yamaguchi <k@rhe.jp>
+
+ * ext/openssl: backport changes from openssl 2.1.2.
+
Wed Mar 28 23:08:46 2018 NAKAMURA Usaku <usa@ruby-lang.org>
get rid of test error/failure on Windows introduced at r62955
diff --git a/ext/openssl/ossl_x509name.c b/ext/openssl/ossl_x509name.c
index a0e28e2..d4e85a8 100644
--- a/ext/openssl/ossl_x509name.c
+++ b/ext/openssl/ossl_x509name.c
@@ -339,7 +339,7 @@ ossl_x509name_cmp(VALUE self, VALUE other)
result = ossl_x509name_cmp0(self, other);
if (result < 0) return INT2FIX(-1);
- if (result > 1) return INT2FIX(1);
+ if (result > 0) return INT2FIX(1);
return INT2FIX(0);
}
diff --git a/test/openssl/test_x509name.rb b/test/openssl/test_x509name.rb
index 56e7987..411fa3b 100644
--- a/test/openssl/test_x509name.rb
+++ b/test/openssl/test_x509name.rb
@@ -338,10 +338,16 @@ class OpenSSL::TestX509Name < Test::Unit::TestCase
end
def test_spaceship
- n1 = OpenSSL::X509::Name.parse 'CN=a'
- n2 = OpenSSL::X509::Name.parse 'CN=b'
-
- assert_equal(-1, n1 <=> n2)
+ n1 = OpenSSL::X509::Name.new([["CN", "a"]])
+ n2 = OpenSSL::X509::Name.new([["CN", "a"]])
+ n3 = OpenSSL::X509::Name.new([["CN", "ab"]])
+
+ assert_equal 0, n1 <=> n2
+ assert_equal -1, n1 <=> n3
+ assert_equal 0, n2 <=> n1
+ assert_equal -1, n2 <=> n3
+ assert_equal 1, n3 <=> n1
+ assert_equal 1, n3 <=> n2
end
def name_hash(name)
diff --git a/version.h b/version.h
index 6163e7f..1172777 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
-#define RUBY_VERSION "2.3.7"
+#define RUBY_VERSION "2.3.8"
#define RUBY_RELEASE_DATE "2018-10-18"
-#define RUBY_PATCHLEVEL 458
+#define RUBY_PATCHLEVEL 459
#define RUBY_RELEASE_YEAR 2018
#define RUBY_RELEASE_MONTH 10