Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixup! crypto: use kNoAuthTagLength in InitAuthenticated
  • Loading branch information
tniessen committed Apr 24, 2018
commit 217b6065abb992080cabf90d3847731d5c54fcfb
8 changes: 4 additions & 4 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2705,9 +2705,9 @@ void CipherBase::Init(const FunctionCallbackInfo<Value>& args) {
// represent a valid length at this point.
unsigned int auth_tag_len;
if (args[2]->IsUint32()) {
auth_tag_len = args[2]->Uint32Value();
auth_tag_len = args[2].As<v8::Uint32>()->Value();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add using v8::Uint32; and using v8::Int32; at the top?

} else {
CHECK(args[2]->IsInt32() && args[2]->Int32Value() == -1);
CHECK(args[2]->IsInt32() && args[2].As<v8::Int32>()->Value() == -1);
auth_tag_len = kNoAuthTagLength;
}

Expand Down Expand Up @@ -2799,9 +2799,9 @@ void CipherBase::InitIv(const FunctionCallbackInfo<Value>& args) {
// represent a valid length at this point.
unsigned int auth_tag_len;
if (args[3]->IsUint32()) {
auth_tag_len = args[3]->Uint32Value();
auth_tag_len = args[3].As<v8::Uint32>()->Value();
} else {
CHECK(args[3]->IsInt32() && args[3]->Int32Value() == -1);
CHECK(args[3]->IsInt32() && args[3].As<v8::Int32>()->Value() == -1);
auth_tag_len = kNoAuthTagLength;
}

Expand Down