mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
crypto: improve GetECGroupBits signature
Remove the unused ECPointer argument and rename the function since the current name is misleading. PR-URL: https://github.com/nodejs/node/pull/53364 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
7705efd860
commit
9446278f03
1 file changed
+5
-12
@@ -441,10 +441,7 @@ MaybeLocal<Value> GetECPubKey(
|
||||
nullptr).FromMaybe(Local<Object>());
|
||||
}
|
||||
|
||||
MaybeLocal<Value> GetECGroup(
|
||||
Environment* env,
|
||||
const EC_GROUP* group,
|
||||
const ECPointer& ec) {
|
||||
MaybeLocal<Value> GetECGroupBits(Environment* env, const EC_GROUP* group) {
|
||||
if (group == nullptr)
|
||||
return Undefined(env->isolate());
|
||||
|
||||
@@ -1324,14 +1321,10 @@ MaybeLocal<Object> X509ToObject(
|
||||
} else if (ec) {
|
||||
const EC_GROUP* group = EC_KEY_get0_group(ec.get());
|
||||
|
||||
if (!Set<Value>(context,
|
||||
info,
|
||||
env->bits_string(),
|
||||
GetECGroup(env, group, ec)) ||
|
||||
!Set<Value>(context,
|
||||
info,
|
||||
env->pubkey_string(),
|
||||
GetECPubKey(env, group, ec))) {
|
||||
if (!Set<Value>(
|
||||
context, info, env->bits_string(), GetECGroupBits(env, group)) ||
|
||||
!Set<Value>(
|
||||
context, info, env->pubkey_string(), GetECPubKey(env, group, ec))) {
|
||||
return MaybeLocal<Object>();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user