-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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: remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER #53305
Merged
nodejs-github-bot
merged 1 commit into
nodejs:main
from
tniessen:crypto-scrypt-option-pairs
Jul 10, 2024
Merged
crypto: remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER #53305
nodejs-github-bot
merged 1 commit into
nodejs:main
from
tniessen:crypto-scrypt-option-pairs
Jul 10, 2024
Conversation
This file contains 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
It is confusing to have both ERR_CRYPTO_SCRYPT_INVALID_PARAMETER and ERR_CRYPTO_INVALID_SCRYPT_PARAMS. The former was the original error code, added in 371103d, but parameter validation gradually changed and now produces ERR_CRYPTO_INVALID_SCRYPT_PARAMS for all parameter validation errors coming from OpenSSL, as well as different error codes for validation errors coming from JavaScript. The only remaining use of ERR_CRYPTO_SCRYPT_INVALID_PARAMETER is in the validation logic that ensures that no two synonymous options were passed. We already have an error code for that particular case, ERR_INCOMPATIBLE_OPTION_PAIR, so replace these last instances of ERR_CRYPTO_SCRYPT_INVALID_PARAMETER with that error code and remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER. If there ever is need again for such an error code, we can just use ERR_CRYPTO_INVALID_SCRYPT_PARAMS. Refs: nodejs#35093 Refs: nodejs#21525 Refs: nodejs#20816
tniessen
added
crypto
Issues and PRs related to the crypto subsystem.
semver-major
PRs that contain breaking changes and should be released in the next major version.
labels
Jun 3, 2024
Review requested:
|
nodejs-github-bot
added
errors
Issues and PRs related to JavaScript errors originated in Node.js core.
needs-ci
PRs that need a full CI run.
labels
Jun 3, 2024
jasnell
approved these changes
Jun 3, 2024
panva
approved these changes
Jun 3, 2024
lpinca
approved these changes
Jun 3, 2024
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Jun 3, 2024
This comment was marked as outdated.
This comment was marked as outdated.
panva
added
the
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
Jun 4, 2024
cc @nodejs/tsc since this is semver-major, strictly speaking. |
This PR has been waiting for a second approval from @nodejs/tsc for more than a month. CitGM: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/3452/ |
richardlau
approved these changes
Jul 10, 2024
benjamingr
approved these changes
Jul 10, 2024
tniessen
added
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Jul 10, 2024
nodejs-github-bot
removed
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Jul 10, 2024
Landed in 33a6d1f |
ehsankhfr
pushed a commit
to ehsankhfr/node
that referenced
this pull request
Jul 18, 2024
It is confusing to have both ERR_CRYPTO_SCRYPT_INVALID_PARAMETER and ERR_CRYPTO_INVALID_SCRYPT_PARAMS. The former was the original error code, added in 371103d, but parameter validation gradually changed and now produces ERR_CRYPTO_INVALID_SCRYPT_PARAMS for all parameter validation errors coming from OpenSSL, as well as different error codes for validation errors coming from JavaScript. The only remaining use of ERR_CRYPTO_SCRYPT_INVALID_PARAMETER is in the validation logic that ensures that no two synonymous options were passed. We already have an error code for that particular case, ERR_INCOMPATIBLE_OPTION_PAIR, so replace these last instances of ERR_CRYPTO_SCRYPT_INVALID_PARAMETER with that error code and remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER. If there ever is need again for such an error code, we can just use ERR_CRYPTO_INVALID_SCRYPT_PARAMS. Refs: nodejs#35093 Refs: nodejs#21525 Refs: nodejs#20816 PR-URL: nodejs#53305 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
crypto
Issues and PRs related to the crypto subsystem.
errors
Issues and PRs related to JavaScript errors originated in Node.js core.
needs-ci
PRs that need a full CI run.
semver-major
PRs that contain breaking changes and should be released in the next major version.
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.
It is confusing to have both
ERR_CRYPTO_SCRYPT_INVALID_PARAMETER
andERR_CRYPTO_INVALID_SCRYPT_PARAMS
. The former was the original error code, added in 371103d, but parameter validation gradually changed and now producesERR_CRYPTO_INVALID_SCRYPT_PARAMS
for all parameter validation errors coming from OpenSSL, as well as different error codes for validation errors coming from JavaScript.The only remaining use of
ERR_CRYPTO_SCRYPT_INVALID_PARAMETER
is in the validation logic that ensures that no two synonymous options were passed. We already have an error code for that particular case,ERR_INCOMPATIBLE_OPTION_PAIR
, so replace these last instances ofERR_CRYPTO_SCRYPT_INVALID_PARAMETER
with that error code and removeERR_CRYPTO_SCRYPT_INVALID_PARAMETER
. If there ever is need again for such an error code, we can just useERR_CRYPTO_INVALID_SCRYPT_PARAMS
.This also improves the error messages where Node.js would previously throw
ERR_CRYPTO_SCRYPT_INVALID_PARAMETER
.Refs: #35093
Refs: #21525
Refs: #20816