Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: check EC_POINT_get_affine_coordinates result #42304

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/crypto/crypto_ec.cc
Expand Up @@ -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(),
Expand Down