-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Ed25519 keys/certificates #8869
base: main
Are you sure you want to change the base?
Conversation
Hi @tambry thanks for you contribution! I think we'll need a few more changes to merge this:
I think it'd be better to only allow key types that we know work. The trouble is the if !private_key.is_a?(OpenSSL::PKey::RSA) && \
!private_key.is_a?(OpenSSL::PKey::EC) && \
!(private_key.is_a?(OpenSSL::PKey::PKey) && private_key.respond_to?(:oid) && private_key.oid == 'ED25519')
raise ... |
Hi @tambry changes look great! Could you rebase on main and resolve the ssl_provider conflict? |
@joshcooper Sorry for the delay. I'll try to have a look at this within a few weeks. Last time I got hung up on updating the tests. I began, but getting a Ruby development environment setup proved a bit annoying as I couldn't simply grab the dependencies from my system package manager. I was also worried about breaking my whole Debian install so I began creating a separate rootfs, investigating how to use |
@tambry looks like there are some conflicts now. Could you rebase on |
The generic interface usage was added by 78712fe, which improved key format support. ruby-openssl 3.0, shipped in Ruby 3.0, supports Ed25519 keys using the generic interface and returns a OpenSSL::PKey::PKey. The only thing preventing these from working is a simple type check. Update it to only check key types that aren't supported.
@joshcooper Thanks for the reminder, I've rebased. Note that the tests remain unfinished and are probably insufficient. |
@tambry The ed25519 fixtures are missing, so tests are failing. Could you run |
Ping @tambry |
It seems ruby-openssl bindings don't support signing certificates with ed25519 keys. See ruby/openssl b0fc100091207d7eab20a349433ccbd8260c6ddd |
The generic interface usage was added by 78712fe, which improved key format support.
ruby-openssl 3.0, shipped in Ruby 3.0, supports Ed25519 keys using the generic interface and returns a OpenSSL::PKey::PKey.
The only thing preventing these from working is a simple type check. Remove it and update various type annotations to refer to OpenSSL::PKey::PKey, though the old types will still work.