| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0d128e3 commit a472745
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4065,12 +4065,15 @@ The [`util.types.isNativeError`][] API is deprecated. Please use [`Error.isError | |||
| 4065 | 4065 | ||
| 4066 | 4066 | <!-- YAML | |
| 4067 | 4067 | changes: | |
| 4068 | + - version: REPLACEME | ||
| 4069 | + pr-url: https://github.com/nodejs/node/pull/59008 | ||
| 4070 | + description: Runtime deprecation. | ||
| 4068 | 4071 | - version: v24.4.0 | |
| 4069 | 4072 | pr-url: https://github.com/nodejs/node/pull/58942 | |
| 4070 | 4073 | description: Documentation-only deprecation with support for `--pending-deprecation`. | |
| 4071 | 4074 | --> | |
| 4072 | 4075 | ||
| 4073 | - Type: Documentation-only (supports [`--pending-deprecation`][]) | ||
| 4076 | + Type: Runtime | ||
| 4074 | 4077 | ||
| 4075 | 4078 | Creating SHAKE-128 and SHAKE-256 digests without an explicit `options.outputLength` is deprecated. | |
| 4076 | 4079 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,7 +34,6 @@ const { | |||
| 34 | 34 | lazyDOMException, | |
| 35 | 35 | normalizeEncoding, | |
| 36 | 36 | encodingsMap, | |
| 37 | - isPendingDeprecation, | ||
| 38 | 37 | getDeprecationWarningEmitter, | |
| 39 | 38 | } = require('internal/util'); | |
| 40 | 39 | ||
@@ -80,7 +79,6 @@ const maybeEmitDeprecationWarning = getDeprecationWarningEmitter( | |||
| 80 | 79 | undefined, | |
| 81 | 80 | false, | |
| 82 | 81 | (algorithm) => { | |
| 83 | - if (!isPendingDeprecation()) return false; | ||
| 84 | 82 | const normalized = normalizeAlgorithm(algorithm); | |
| 85 | 83 | return normalized === 'shake128' || normalized === 'shake256'; | |
| 86 | 84 | }, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -251,6 +251,7 @@ void Hash::OneShotDigest(const FunctionCallbackInfo<Value>& args) { | |||
| 251 | 251 | } else if (output_length == 0) { | |
| 252 | 252 | // This is to handle OpenSSL 3.4's breaking change in SHAKE128/256 | |
| 253 | 253 | // default lengths | |
| 254 | + // TODO(@panva): remove this behaviour when DEP0198 is End-Of-Life | ||
| 254 | 255 | const char* name = OBJ_nid2sn(EVP_MD_type(md)); | |
| 255 | 256 | if (name != nullptr) { | |
| 256 | 257 | if (strcmp(name, "SHAKE128") == 0) { | |
@@ -379,6 +380,9 @@ bool Hash::HashInit(const EVP_MD* md, Maybe<unsigned int> xof_md_len) { | |||
| 379 | 380 | } | |
| 380 | 381 | ||
| 381 | 382 | md_len_ = mdctx_.getDigestSize(); | |
| 383 | + | ||
| 384 | + // This is to handle OpenSSL 3.4's breaking change in SHAKE128/256 | ||
| 385 | + // default lengths | ||
| 382 | 386 | // TODO(@panva): remove this behaviour when DEP0198 is End-Of-Life | |
| 383 | 387 | if (mdctx_.hasXofFlag() && !xof_md_len.IsJust() && md_len_ == 0) { | |
| 384 | 388 | const char* name = OBJ_nid2sn(EVP_MD_type(md)); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,3 @@ | |||
| 1 | - // Flags: --pending-deprecation | ||
| 2 | 1 | 'use strict'; | |
| 3 | 2 | ||
| 4 | 3 | const common = require('../common'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,3 @@ | |||
| 1 | - // Flags: --pending-deprecation | ||
| 2 | 1 | 'use strict'; | |
| 3 | 2 | ||
| 4 | 3 | const common = require('../common'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,15 @@ if (!common.hasCrypto) { | |||
| 4 | 4 | common.skip('missing crypto'); | |
| 5 | 5 | } | |
| 6 | 6 | ||
| 7 | + common.expectWarning({ | ||
| 8 | + DeprecationWarning: [ | ||
| 9 | + ['crypto.Hash constructor is deprecated.', | ||
| 10 | + 'DEP0179'], | ||
| 11 | + ['Creating SHAKE128/256 digests without an explicit options.outputLength is deprecated.', | ||
| 12 | + 'DEP0198'], | ||
| 13 | + ] | ||
| 14 | + }); | ||
| 15 | + | ||
| 7 | 16 | const assert = require('assert'); | |
| 8 | 17 | const crypto = require('crypto'); | |
| 9 | 18 | const fs = require('fs'); | |
@@ -280,10 +289,4 @@ assert.throws( | |||
| 280 | 289 | ||
| 281 | 290 | { | |
| 282 | 291 | crypto.Hash('sha256'); | |
| 283 | - common.expectWarning({ | ||
| 284 | - DeprecationWarning: [ | ||
| 285 | - ['crypto.Hash constructor is deprecated.', | ||
| 286 | - 'DEP0179'], | ||
| 287 | - ] | ||
| 288 | - }); | ||
| 289 | 292 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments