-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
crypto: use kNoAuthTagLength in InitAuthenticated #20225
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
crypto: use kNoAuthTagLength in InitAuthenticated #20225
Conversation
bnoordhuis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo comment.
src/node_crypto.cc
Outdated
| int auth_tag_len = args[2].As<v8::Int32>()->Value(); | ||
| unsigned int auth_tag_len; | ||
| if (args[2]->IsUint32()) { | ||
| auth_tag_len = args[2]->Uint32Value(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the overload that takes a Local<Context> or use the args[2].As<Uint32>()->Value() idiom?
src/node_crypto.cc
Outdated
| unsigned int auth_tag_len; | ||
| if (args[2]->IsUint32()) { | ||
| auth_tag_len = args[2]->Uint32Value(); | ||
| auth_tag_len = args[2].As<v8::Uint32>()->Value(); |
There was a problem hiding this comment.
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?
|
Should this be backported to |
PR-URL: nodejs#20225 Refs: nodejs#20039 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: nodejs#20225 Refs: nodejs#20039 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
As suggested by @bnoordhuis in #20039, this changes
InitAuthenticatedto accept anunsigned int auth_tag_len.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes