Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
crypto: fix error condition in Verify::VerifyFinal
Fail early if key parsing failed, don't try to construct a context out of it.
  • Loading branch information
tniessen committed Feb 21, 2019
commit b32fa3ce1a0dca77369cce4f2f6c16f4c3c850ac
2 changes: 2 additions & 0 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4675,6 +4675,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]);
Expand Down