From 935360e321deed17e33b874d3059e4e04c4a1c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Thu, 6 Jun 2024 14:35:14 +0000 Subject: [PATCH] tls: use SSL_get_peer_tmp_key Both OpenSSL 1.1.1 and 3.x support SSL_get_peer_tmp_key as a replacement for SSL_get_server_tmp_key. While the old function name still exists as an alias, it does not accurately reflect the function's behavior (anymore). Hence, use the new function name here. --- src/crypto/crypto_common.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc index ee1c7931a5c83e..2a2eba0eb3e31e 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -1104,7 +1104,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)) + if (!SSL_get_peer_tmp_key(ssl.get(), &raw_key)) return scope.Escape(info); Local context = env->context();