crypto: deduplicate cipher initialization code#23011
Closed
tniessen wants to merge 2 commits intonodejs:masterfrom
Closed
crypto: deduplicate cipher initialization code#23011tniessen wants to merge 2 commits intonodejs:masterfrom
tniessen wants to merge 2 commits intonodejs:masterfrom
Conversation
CipherBase::Init and CipherBase::InitIv contain a lot of duplicate code, this commit moves that into a separate function.
addaleax
approved these changes
Sep 22, 2018
src/node_crypto.cc
Outdated
| "Failed to initialize cipher"); | ||
| } | ||
| this->CommonInit(cipher_type, cipher, key, key_len, iv, | ||
| EVP_CIPHER_iv_length(cipher), auth_tag_len); |
bnoordhuis
approved these changes
Sep 22, 2018
Member
Author
|
CI: https://ci.nodejs.org/job/node-test-pull-request/17373/ |
jasnell
approved these changes
Sep 22, 2018
ryzokuken
approved these changes
Sep 23, 2018
Contributor
|
Landed in b7bdde0. |
danbev
pushed a commit
that referenced
this pull request
Sep 26, 2018
CipherBase::Init and CipherBase::InitIv contain a lot of duplicate code, this commit moves that into a separate function. PR-URL: #23011 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
targos
pushed a commit
that referenced
this pull request
Sep 27, 2018
CipherBase::Init and CipherBase::InitIv contain a lot of duplicate code, this commit moves that into a separate function. PR-URL: #23011 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
This was referenced Oct 10, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CipherBase::InitandCipherBase::InitIvcontain a lot of duplicate code, this commit moves that into a separate function and makes necessary abstractions.cc @nodejs/crypto
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes