diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc index db6e389dbadde7..ccfb51fe745d6a 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -1101,8 +1101,7 @@ MaybeLocal GetEphemeralKey(Environment* env, const SSLPointer& ssl) { EscapableHandleScope scope(env->isolate()); Local info = Object::New(env->isolate()); - if (!SSL_get_server_tmp_key(ssl.get(), &raw_key)) - return scope.Escape(info); + if (!SSL_get_peer_tmp_key(ssl.get(), &raw_key)) return scope.Escape(info); Local context = env->context(); crypto::EVPKeyPointer key(raw_key);