mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
src: check EC_POINT_get_affine_coordinates result
PR-URL: https://github.com/nodejs/node/pull/42304 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
1 parent
1c1061549a
commit
5b30e28eb4
1 file changed
+5
-1
@@ -733,7 +733,11 @@ Maybe<void> ExportJWKEcKey(
|
||||
BignumPointer x(BN_new());
|
||||
BignumPointer y(BN_new());
|
||||
|
||||
EC_POINT_get_affine_coordinates(group, pub, x.get(), y.get(), nullptr);
|
||||
if (!EC_POINT_get_affine_coordinates(group, pub, x.get(), y.get(), nullptr)) {
|
||||
ThrowCryptoError(env, ERR_get_error(),
|
||||
"Failed to get elliptic-curve point coordinates");
|
||||
return Nothing<void>();
|
||||
}
|
||||
|
||||
if (target->Set(
|
||||
env->context(),
|
||||
|
||||
Reference in new issue
Block a user