-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Proposal: Splitting up node_crypto.cc #16524
Comments
Ping @nodejs/crypto |
I'm not bothered by the file size, that doesn't really impact maintainability and I don't really see how breaking it into smaller files would help. That said, I'm not opposed unless it means I need to review big, boring pull requests. |
I am okay with such a change as long as there are not too many (small) submodules, but I would generally prefer to break it down. |
@jasnell Was this closed due to inactivity? @ryzokuken brought this up in #21288 (review) again. |
Yes, closed due to inactivity. It's fine to reopen if folks want to work on it |
The
src/node_crypto.cc
file is currently 6k+ lines of code that providesprocess.binding('crypto')
. This one internal binding provides an array of crypto functions include Signing, Verification, Hash, limited key-generation, SecureContext for TLS connections, etc. As such, this one file has a LOT of code in it and it is quite difficult from a maintenance perspective.Looking it over, I'd like to refactor both the source files and the
process.binding()
for crypto such that each individual subcomponent ofnode_crypto.cc
is moved to it's ownsrc/node_crypto_nnnn.cc
file with it's own distinctprocess.binding('crypto-nnnn')
. This will make it easier for us to maintain and update individual pieces of the code.This would be a fairly large and time consuming refactoring so I wanted to make sure that folks are on board with it before I started down that path.
FWIW, there are two efforts prompting this:
The text was updated successfully, but these errors were encountered: