mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
crypto: fix error condition in Verify::VerifyFinal
Fail early if key parsing failed, don't try to construct a context out of it. PR-URL: https://github.com/nodejs/node/pull/26238 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
1 parent
a9a2c5869c
commit
70e463c294
1 file changed
+2
@@ -4648,6 +4648,8 @@ void Verify::VerifyFinal(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
unsigned int offset = 0;
|
||||
ManagedEVPPKey pkey = GetPublicOrPrivateKeyFromJs(args, &offset, true);
|
||||
if (!pkey)
|
||||
return;
|
||||
|
||||
char* hbuf = Buffer::Data(args[offset]);
|
||||
ssize_t hlen = Buffer::Length(args[offset]);
|
||||
|
||||
Reference in new issue
Block a user