Skip to content

Commit

Permalink
tls: use SSL_get_peer_tmp_key
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tniessen committed Jun 6, 2024
1 parent 1aab854 commit 935360e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/crypto_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ MaybeLocal<Object> GetEphemeralKey(Environment* env, const SSLPointer& ssl) {

EscapableHandleScope scope(env->isolate());
Local<Object> 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> context = env->context();
Expand Down

0 comments on commit 935360e

Please sign in to comment.