mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
src: fix error handling in ExportJWKAsymmetricKey
Because call sites check IsNothing() on the return value of ExportJWKAsymmetricKey() and ignore the boolean value if the return value is Just (i.e., not nothing), this function must return Nothing() instead of Just(false) when throwing a JavaScript error. PR-URL: https://github.com/nodejs/node/pull/53767 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
345b3de602
commit
97918364f6
1 file changed
+1
-1
@@ -505,7 +505,7 @@ Maybe<bool> ExportJWKAsymmetricKey(
|
||||
case EVP_PKEY_X448: return ExportJWKEdKey(env, key, target);
|
||||
}
|
||||
THROW_ERR_CRYPTO_JWK_UNSUPPORTED_KEY_TYPE(env);
|
||||
return Just(false);
|
||||
return Nothing<bool>();
|
||||
}
|
||||
|
||||
std::shared_ptr<KeyObjectData> ImportJWKAsymmetricKey(
|
||||
|
||||
Reference in new issue
Block a user