[rubygems/rubygems] Provide distinguished name which will be correctly parsed.
It seems that since ruby openssl 2.1.0 [1], the distinguished name submitted to OpenSSL::X509::Name.parse is not correctly parsed if it does not contain the first slash:
OpenSSL::X509::Name.parse
$ ruby -v ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux] $ gem list | grep openssl openssl (default: 2.2.0) $ irb -r openssl irb(main):001:0> OpenSSL::X509::Name.parse("CN=nobody/DC=example").to_s(OpenSSL::X509::Name::ONELINE) => "CN = nobody/DC=example" irb(main):002:0> OpenSSL::X509::Name.parse("/CN=nobody/DC=example").to_s(OpenSSL::X509::Name::ONELINE) => "CN = nobody, DC = example"
Instead, use OpenSSL::X509::Name.new directly as suggested by upstream maintainer.
OpenSSL::X509::Name.new
https://github.com/rubygems/rubygems/commit/09ca0c2dae
Co-authored-by: Kazuki Yamaguchi [email protected]
[rubygems/rubygems] Provide distinguished name which will be correctly parsed.
It seems that since ruby openssl 2.1.0 [1], the distinguished name
submitted to
OpenSSL::X509::Name.parse
is not correctly parsed if itdoes not contain the first slash:
Instead, use
OpenSSL::X509::Name.new
directly as suggested by upstreammaintainer.
https://github.com/rubygems/rubygems/commit/09ca0c2dae
Co-authored-by: Kazuki Yamaguchi [email protected]