Skip to content

Commit 95420da

Browse files
committed
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.
1 parent 1aab854 commit 95420da

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/crypto/crypto_common.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,8 +1104,7 @@ MaybeLocal<Object> GetEphemeralKey(Environment* env, const SSLPointer& ssl) {
11041104

11051105
EscapableHandleScope scope(env->isolate());
11061106
Local<Object> info = Object::New(env->isolate());
1107-
if (!SSL_get_server_tmp_key(ssl.get(), &raw_key))
1108-
return scope.Escape(info);
1107+
if (!SSL_get_peer_tmp_key(ssl.get(), &raw_key)) return scope.Escape(info);
11091108

11101109
Local<Context> context = env->context();
11111110
crypto::EVPKeyPointer key(raw_key);

0 commit comments

Comments
 (0)