-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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: migrate CipherBase to internal/errors #16527
Conversation
ping @nodejs/tsc |
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
CI is good. |
d314326
to
bd0ddad
Compare
src/node_crypto.cc
Outdated
CipherBase* cipher; | ||
ASSIGN_OR_RETURN_UNWRAP(&cipher, args.Holder()); | ||
|
||
if (!cipher->initialised_ || | ||
!cipher->IsAuthenticatedMode() || | ||
cipher->kind_ != kDecipher) { | ||
return env->ThrowError("Attempting to set auth tag in unsupported state"); | ||
return args.GetReturnValue().Set(true); |
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.
Any reason this is inconsistent with #16529 (which return false on error?)
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.
good catch. no particular reason, just didn't remember ;-) I'll change this to false
bd0ddad
to
40d144e
Compare
Migrates most of CipherBase errors to use internal/errors. There are still a handful remaining that need to be handled separately
40d144e
to
acd2d94
Compare
@joyeecheung ... PTAL |
Migrates most of CipherBase errors to use internal/errors. There are still a handful remaining that need to be handled separately PR-URL: #16527 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Landed in e567402 |
Migrates most of CipherBase errors to use internal/errors. There are still a handful remaining that need to be handled separately PR-URL: nodejs/node#16527 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Migrates most of CipherBase errors to use internal/errors. There are still a handful remaining that need to be handled separately PR-URL: nodejs/node#16527 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Migrates most of CipherBase errors to use internal/errors.
There are still a handful remaining that need to be handled
separately
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
crypto