Skip to content

Commit faa5cac

Browse files
tniessenmarco-ippolito
authored andcommitted
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. PR-URL: #53366 Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Tim Perry <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent 9e0a6e9 commit faa5cac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/crypto/crypto_common.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -1101,8 +1101,7 @@ MaybeLocal<Object> GetEphemeralKey(Environment* env, const SSLPointer& ssl) {
11011101

11021102
EscapableHandleScope scope(env->isolate());
11031103
Local<Object> info = Object::New(env->isolate());
1104-
if (!SSL_get_server_tmp_key(ssl.get(), &raw_key))
1105-
return scope.Escape(info);
1104+
if (!SSL_get_peer_tmp_key(ssl.get(), &raw_key)) return scope.Escape(info);
11061105

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

0 commit comments

Comments
 (0)