mirror of https://github.com/nodejs/node.git
crypto: runtime deprecate replaced rsa-pss keygen parameters
PR-URL: https://github.com/nodejs/node/pull/45653 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
parent
a266b8b702
commit
08af023b1f
|
@ -2973,12 +2973,15 @@ option, or a non-nullish non-boolean value for `verbatim` option in
|
|||
|
||||
<!-- YAML
|
||||
changes:
|
||||
- version: REPLACEME
|
||||
pr-url: https://github.com/nodejs/node/pull/45653
|
||||
description: Runtime deprecation.
|
||||
- version: v16.10.0
|
||||
pr-url: https://github.com/nodejs/node/pull/39927
|
||||
description: Documentation-only deprecation.
|
||||
-->
|
||||
|
||||
Type: Documentation-only (supports [`--pending-deprecation`][])
|
||||
Type: Runtime
|
||||
|
||||
The `'hash'` and `'mgf1Hash'` options are replaced with `'hashAlgorithm'`
|
||||
and `'mgf1HashAlgorithm'`.
|
||||
|
|
|
@ -63,8 +63,6 @@ const {
|
|||
|
||||
const { isArrayBufferView } = require('internal/util/types');
|
||||
|
||||
const { getOptionValue } = require('internal/options');
|
||||
|
||||
function isJwk(obj) {
|
||||
return obj != null && obj.kty !== undefined;
|
||||
}
|
||||
|
@ -204,8 +202,6 @@ function createJob(mode, type, options) {
|
|||
hash, mgf1Hash, hashAlgorithm, mgf1HashAlgorithm, saltLength
|
||||
} = options;
|
||||
|
||||
const pendingDeprecation = getOptionValue('--pending-deprecation');
|
||||
|
||||
if (saltLength !== undefined)
|
||||
validateInt32(saltLength, 'options.saltLength', 0);
|
||||
if (hashAlgorithm !== undefined)
|
||||
|
@ -213,7 +209,7 @@ function createJob(mode, type, options) {
|
|||
if (mgf1HashAlgorithm !== undefined)
|
||||
validateString(mgf1HashAlgorithm, 'options.mgf1HashAlgorithm');
|
||||
if (hash !== undefined) {
|
||||
pendingDeprecation && process.emitWarning(
|
||||
process.emitWarning(
|
||||
'"options.hash" is deprecated, ' +
|
||||
'use "options.hashAlgorithm" instead.',
|
||||
'DeprecationWarning',
|
||||
|
@ -224,7 +220,7 @@ function createJob(mode, type, options) {
|
|||
}
|
||||
}
|
||||
if (mgf1Hash !== undefined) {
|
||||
pendingDeprecation && process.emitWarning(
|
||||
process.emitWarning(
|
||||
'"options.mgf1Hash" is deprecated, ' +
|
||||
'use "options.mgf1HashAlgorithm" instead.',
|
||||
'DeprecationWarning',
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// Flags: --pending-deprecation
|
||||
|
||||
'use strict';
|
||||
|
||||
const common = require('../common');
|
||||
|
|
Loading…
Reference in New Issue