Skip to content

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

Description

@owenthereal

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", "gotoyuzo@ruby-lang.org"],
?>           ["serialNumber", "123"],
?>         ]
=> [["DC", "org"], ["DC", "ruby-lang"], ["CN", "GOTOU Yuuzou"], ["emailAddress", "gotoyuzo@ruby-lang.org"], ["serialNumber", "123"]]
>> name = OpenSSL::X509::Name.new(dn)
=> /DC=org/DC=ruby-lang/CN=GOTOU Yuuzou/Email=gotoyuzo@ruby-lang.org/SN=123
>> name.to_s
=> "/DC=org/DC=ruby-lang/CN=GOTOU Yuuzou/Email=gotoyuzo@ruby-lang.org/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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions