Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

OpenSSL::PKey::DH#set_key

(::OpenSSL::bn pub_key, ::OpenSSL::bn? priv_key) -> self
dh.set_key(pub_key, priv_key) → self

Sets pub_key and priv_key for the DH instance. priv_key may be nil.

See also #public_key #set_pqg #public? #to_der also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0