Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

OpenSSL::PKey::DH#params_ok?

() -> bool
dh.params_ok? → true | false

Validates the Diffie-Hellman parameters associated with this instance. It checks whether a safe prime and a suitable generator are used. If this is not the case, false is returned.

See also the man page EVP_PKEY_param_check(3).

See also #params #private? #generate_key! #public? also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0