From 4ccaf256a1c178eedaa6840613a54a00d8eba20c Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Tue, 24 Jan 2017 15:29:56 +0900 Subject: x509: fix OpenSSL::X509::Name#eql? Commit 34e7fe34ee32 ("Use rb_obj_class() instead of CLASS_OF()", 2016-09-08) incorrectly inverted the result. Fix it, and add a test case for this. Fixes: 34e7fe34ee32 ("Use rb_obj_class() instead of CLASS_OF()") --- ext/openssl/ossl_x509name.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/openssl/ossl_x509name.c b/ext/openssl/ossl_x509name.c index 4523e0d7..ac98c1b9 100644 --- a/ext/openssl/ossl_x509name.c +++ b/ext/openssl/ossl_x509name.c @@ -375,7 +375,7 @@ ossl_x509name_eql(VALUE self, VALUE other) if (!rb_obj_is_kind_of(other, cX509Name)) return Qfalse; - return ossl_x509name_cmp0(self, other) ? Qtrue : Qfalse; + return ossl_x509name_cmp0(self, other) == 0 ? Qtrue : Qfalse; } /* -- cgit v1.2.3