-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: fix key object wrapping in sync keygen #25326
Conversation
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. Would there be any benefit to calling getSymmetricKeySize()
in the tests since that triggered the crash in #25322?
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 a nit about the security advice.
@cjihrig Good question! The function |
Landed in 7afdfae. |
PR-URL: nodejs#25326 Fixes: nodejs#25322 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#25326 Fixes: nodejs#25322 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
generateKeyPairSync
incorrectly returns the native key object handle instead of the higher-level JS key object. This change fixes that and aligns the documentation withgenerateKeyPair
.Fixes: #25322
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes