Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

OpenSSL::PKey::DH#params_ok?

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? #initialize_copy #public? also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0