jruby-ossl icon indicating copy to clipboard operation
jruby-ossl copied to clipboard

emailAddress attribute in X509 cert doesn't return the right key

Open owenthereal opened this issue 13 years ago • 0 comments

Hi,

Here is what I found out when generating a OpenSSL::X509::Name instance. The "emailAddress" field is turned into "Email" which is not the same as RubySpec:

>>  dn = [
?>           ["DC", "org"],
?>           ["DC", "ruby-lang"],
?>           ["CN", "GOTOU Yuuzou"],
?>           ["emailAddress", "[email protected]"],
?>           ["serialNumber", "123"],
?>         ]
=> [["DC", "org"], ["DC", "ruby-lang"], ["CN", "GOTOU Yuuzou"], ["emailAddress", "[email protected]"], ["serialNumber", "123"]]
>> name = OpenSSL::X509::Name.new(dn)
=> /DC=org/DC=ruby-lang/CN=GOTOU Yuuzou/[email protected]/SN=123
>> name.to_s
=> "/DC=org/DC=ruby-lang/CN=GOTOU Yuuzou/[email protected]/SN=123"

I assume this test will fail: https://github.com/jruby/jruby-ossl/blob/master/test/1.9/test_x509name.rb#L84

Thanks, Owen

owenthereal avatar Feb 14 '12 02:02 owenthereal