Skip to content
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

OpenSSL::PKey::PKeyError: EVP_DigestVerifyInit: invalid digest #3284

Open
HoneyryderChuck opened this issue Oct 3, 2023 · 1 comment
Open
Labels

Comments

@HoneyryderChuck
Copy link
Contributor

In the httpx test suite, I've been monitoring this truffleruby issue for a while, which still manifests after the upgrade to 23.1.0. FWIW I was able to reduce it to plain net-ssh-gateway example (ssh parameters relate to the ssh server used in the tests):

require "uri"
require "net/ssh/gateway"

ssh_uri = URI("ssh://sshproxy:22")

ssh_options = {
  auth_methods: %w[publickey],
  host_key: "ssh-rsa",
  keys: %w[test/support/ssh/ssh_host_ed25519_key]
}

gateway = Net::SSH::Gateway.new(ssh_uri.host, "root", ssh_options)

puts "done"
# works in ruby 3.2, breaks with truffleruby 23.1.0
# /opt/truffleruby-23.1.0/lib/truffle/truffle/cext.rb:1138:in `rb_exc_raise': EVP_DigestVerifyInit: invalid digest (OpenSSL::PKey::PKeyError)
#         from exception.c:29:in `rb_exc_raise'
#         from /opt/truffleruby-23.1.0/src/main/c/openssl/ossl.c:309:in `ossl_raise'
#         from /opt/truffleruby-23.1.0/src/main/c/openssl/ossl_pkey.c:1050:in `ossl_pkey_verify'
#         from /opt/truffleruby-23.1.0/lib/truffle/truffle/cext_ruby.rb:42:in `verify'
#         from /usr/local/bundle/truffleruby/3.2.2.23.1.0/gems/net-ssh-7.2.0/lib/net/ssh/transport/openssl.rb:73:in `ssh_do_verify'
@eregon
Copy link
Member

eregon commented Oct 6, 2023

Thank you for the report, we'll try to take a look.
I might wait after #3118 as that might possibly solve it.

@eregon eregon added the cexts label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants