Skip to content
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
merged 1 commit into from
Jul 10, 2024

Commits on Jun 3, 2024

  1. crypto: remove ERR_CRYPTO_SCRYPT_INVALID_PARAMETER

    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 committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    87c5136 View commit details
    Browse the repository at this point in the history