* ext/openssl: backport changes from openssl 2.1.2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@65135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b18c513e24
commit
556e9f726e
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
n1 = OpenSSL::X509::Name.new([["CN", "a"]])
|
||||
n2 = OpenSSL::X509::Name.new([["CN", "a"]])
|
||||
n3 = OpenSSL::X509::Name.new([["CN", "ab"]])
|
||||
|
||||
assert_equal(-1, n1 <=> n2)
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue