diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/openssl/ossl_x509name.c | 2 | ||||
-rw-r--r-- | test/openssl/test_x509name.rb | 14 | ||||
-rw-r--r-- | version.h | 4 |
4 files changed, 17 insertions, 7 deletions
@@ -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 a0e28e29ec..d4e85a80b7 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 56e79879cf..411fa3ba54 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) @@ -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 |