[#70843] Re: [ruby-cvs:58952] hsbt:r51801 (trunk): * lib/rubygems: Update to RubyGems HEAD(fe61e4c112). — Eric Wong <normalperson@...>
hsbt@ruby-lang.org wrote:
3 messages
2015/09/17
[ruby-core:70795] [Ruby trunk - Feature #5103] [ext/openssl] Object equality for objects based on ASN.1 structures
From:
zzak@...
Date:
2015-09-13 03:32:37 UTC
List:
ruby-core #70795
Issue #5103 has been updated by Zachary Scott.
Assignee changed from Martin Bosslet to openssl
----------------------------------------
Feature #5103: [ext/openssl] Object equality for objects based on ASN.1 structures
https://bugs.ruby-lang.org/issues/5103#change-54179
* Author: Martin Bosslet
* Status: Feedback
* Priority: Normal
* Assignee: openssl
----------------------------------------
Equality behaviour is not overridden by any of the classes that base on ASN.1 structures. This leads to
counterintuitive things such as
require 'openssl'
key = OpenSSL::PKey::RSA.new 256
puts [key].include?(key) # => true
key2 = OpenSSL::PKey.read key.to_pem
puts key == key2 # => false
puts [key].include?(key2) # => false
That's why I'd like to suggest to determine equality for these objects on the encoding level, i.e.
two such objects are equal iff obj1.to_der == obj2.to_der.
--
https://bugs.ruby-lang.org/