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::DH#q is not implemented #253

Closed
postmodern opened this issue May 10, 2022 · 2 comments
Closed

OpenSSL::PKey::DH#q is not implemented #253

postmodern opened this issue May 10, 2022 · 2 comments

Comments

@postmodern
Copy link

postmodern commented May 10, 2022

While technically the #p. #q, and #g methods for OpenSSL::PKey::DH are not documented, they are callable. However, jruby-openssl seems to lack the #q method.

Steps To Reproduce

dh = OpenSSL::PKey::DH.new(1024)
dh.q

Expected Behavior

# => #<OpenSSL::BN:...>

Actual Result

NoMethodError (undefined method `q' for #<OpenSSL::PKey::DH:0x3eee08f5>)

Version

  • jruby 9.3.2.0 (2.6.8) 2021-12-01 0b8223f905 OpenJDK 64-Bit Server VM 11.0.15+10 on 11.0.15+10 +jit [linux-x86_64]
  • jruby-openssl (default: 0.11.0 java)
@peterbherman
Copy link

May be related to this change:

* ext/openssl/openssl_missing.[ch]: Implement EVP_PKEY_get0_*() and
  {RSA,DSA,EC_KEY,DH}_get0_*() functions.
  OpenSSL 1.1.0 makes EVP_PKEY/RSA/DSA/DH opaque. We used to provide
  setter methods for each parameter of each PKey type, for example
  PKey::RSA#e=, but this is no longer possible because the new API
  RSA_set0_key() requires the 'n' at the same time. This commit adds
  deprecation warning to them and adds PKey::*#set_* methods as direct
  wrapper for those new APIs. For example, 'rsa.e = 3' now needs to be
  rewritten as 'rsa.set_key(rsa.n, 3, rsa.d)'.
  [ruby-core:75225] [Feature #12324]

@kares
Copy link
Member

kares commented Apr 11, 2024

added a dummy (nil) q at: adcd031

@kares kares closed this as completed Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants