Skip to content

undefined method `hkdf' for OpenSSL::KDF:Module #321

Open
@mohamedhafez

Description

@mohamedhafez

In trying to run the web-push gem on JRuby 9.4.9.0 with jruby-openssl version 0.15.1, I get the following error:

/Users/mohamed/.rbenv/versions/jruby-9.4.9.0/lib/ruby/gems/shared/gems/web-push-3.0.1/lib/web_push/encryption.rb:29:in `encrypt': undefined method `hkdf' for OpenSSL::KDF:Module (NoMethodError)
	from /Users/mohamed/.rbenv/versions/jruby-9.4.9.0/lib/ruby/gems/shared/gems/web-push-3.0.1/lib/web_push/request.rb:131:in `encrypt_payload'
	from /Users/mohamed/.rbenv/versions/jruby-9.4.9.0/lib/ruby/gems/shared/gems/web-push-3.0.1/lib/web_push/request.rb:127:in `build_payload'
	from /Users/mohamed/.rbenv/versions/jruby-9.4.9.0/lib/ruby/gems/shared/gems/web-push-3.0.1/lib/web_push/request.rb:9:in `initialize'
	from org/jruby/RubyClass.java:922:in `new'
	from /Users/mohamed/.rbenv/versions/jruby-9.4.9.0/lib/ruby/gems/shared/gems/web-push-3.0.1/lib/web_push.rb:43:in `payload_send'

Here's a link to the line that caused the error: https://github.com/pushpad/web-push/blob/537267741b8b8cdd4ecedeb3f2da82e1145566d8/lib/web_push/encryption.rb#L29

This does not happen in MRI 3.1.6 and openssl 3.2.0

Activity

changed the title [-]undefined method `hkdf' for OpenSSL::KDF:Module (NoMethodError)[/-] [+]undefined method `hkdf' for OpenSSL::KDF:Module[/+] on Nov 10, 2024
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

      undefined method `hkdf' for OpenSSL::KDF:Module · Issue #321 · jruby/jruby-openssl