Skip to content

Commit 82092cd

Browse files
tniessentargos
authored andcommitted
crypto: improve GetECGroupBits signature
Remove the unused ECPointer argument and rename the function since the current name is misleading. PR-URL: #53364 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 63f62d7 commit 82092cd

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/crypto/crypto_common.cc

+5-12
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,7 @@ MaybeLocal<Value> GetECPubKey(
441441
nullptr).FromMaybe(Local<Object>());
442442
}
443443

444-
MaybeLocal<Value> GetECGroup(
445-
Environment* env,
446-
const EC_GROUP* group,
447-
const ECPointer& ec) {
444+
MaybeLocal<Value> GetECGroupBits(Environment* env, const EC_GROUP* group) {
448445
if (group == nullptr)
449446
return Undefined(env->isolate());
450447

@@ -1324,14 +1321,10 @@ MaybeLocal<Object> X509ToObject(
13241321
} else if (ec) {
13251322
const EC_GROUP* group = EC_KEY_get0_group(ec.get());
13261323

1327-
if (!Set<Value>(context,
1328-
info,
1329-
env->bits_string(),
1330-
GetECGroup(env, group, ec)) ||
1331-
!Set<Value>(context,
1332-
info,
1333-
env->pubkey_string(),
1334-
GetECPubKey(env, group, ec))) {
1324+
if (!Set<Value>(
1325+
context, info, env->bits_string(), GetECGroupBits(env, group)) ||
1326+
!Set<Value>(
1327+
context, info, env->pubkey_string(), GetECPubKey(env, group, ec))) {
13351328
return MaybeLocal<Object>();
13361329
}
13371330

0 commit comments

Comments
 (0)