Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
OpenSSL::SSL::SSLSocket#tmp_key
ssl.tmp_key => PKey or nil
ext/openssl/ossl_ssl.c
View on GitHub ↗
static VALUE
ossl_ssl_tmp_key(VALUE self)
{
SSL *ssl;
EVP_PKEY *key;
GetSSL(self, ssl);
if (!SSL_get_server_tmp_key(ssl, &key))
return Qnil;
return ossl_pkey_new(key);
}
Returns the ephemeral key used in case of forward secrecy cipher.
See also
#tmp_dh_callback
#using_anon_cipher?
#syswrite_nonblock
#verify_result
also in
4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0