crypto: remove unused code in sign/verify#12397
crypto: remove unused code in sign/verify#12397tniessen wants to merge 1 commit intonodejs:masterfrom
Conversation
sam-github
left a comment
There was a problem hiding this comment.
Code looks ok if its passing tests, but the commit message could say something more specific. Was there an encoding arg supported by the C++ layer that was always being passed null, and you removed that?
addaleax
left a comment
There was a problem hiding this comment.
Looks good, but I agree that the commit message could be a bit more specific
fbd224a to
d8be739
Compare
|
@sam-github @addaleax I tried to do better this time. Yes, it is about an unused encoding parameter in both methods. |
sam-github
left a comment
There was a problem hiding this comment.
Thanks, nice commit message. Maybe subject could be more specific, like "crypto: remove unused C++ arg in sign/verify" if its < 50 chars, but I'm good with this message as-is.
Removes code in node_crypto.cc in Sign::SignFinal and Verify::VerifyFinal which allowed to convert between buffers and strings based on given encodings. The code is unused as crypto.js only passes in and expects buffers and does the conversion itself. The encoding parameter was removed from both methods.
|
@sam-github I changed the subject to "crypto: remove unused C++ parameter in sign/verify" (50 chars) but will wait for CI to finish after experiencing problems with CI and force-pushs. |
d8be739 to
1d9aa7a
Compare
|
CI passed, subject changed. |
Removes code in node_crypto.cc in Sign::SignFinal and Verify::VerifyFinal which allowed to convert between buffers and strings based on given encodings. The code is unused as crypto.js only passes in and expects buffers and does the conversion itself. The encoding parameter was removed from both methods. PR-URL: #12397 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Landed in eaa0542 |
|
Should this be backported to |
Removes unused code in
node_crypto.ccinSign::SignFinalandVerify::VerifyFinalas suggested by @addaleax here.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
crypto