File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -3078,10 +3078,9 @@ and initialization vector (`iv`).
30783078The ` options ` argument controls stream behavior and is optional except when a
30793079cipher in CCM or OCB mode (e.g. ` 'aes-128-ccm' ` ) is used. In that case, the
30803080` authTagLength ` option is required and specifies the length of the
3081- authentication tag in bytes, see [ CCM mode] [ ] . In GCM mode, the ` authTagLength `
3082- option is not required but can be used to restrict accepted authentication tags
3083- to those with the specified length.
3084- For ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16 bytes.
3081+ authentication tag in bytes, see [ CCM mode] [ ] .
3082+ For AES-GCM and ` chacha20-poly1305 ` , the ` authTagLength ` option defaults to 16
3083+ bytes and must be set to a different value if a different length is used.
30853084
30863085The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
30873086recent OpenSSL releases, ` openssl list -cipher-algorithms ` will
Original file line number Diff line number Diff line change @@ -3623,15 +3623,18 @@ Please use the [`crypto.createHmac()`][] method to create Hmac instances.
36233623
36243624<!-- YAML
36253625changes:
3626+ - version: REPLACEME
3627+ pr-url: https://github.com/nodejs/node/pull/52552
3628+ description: Runtime deprecation.
36263629 - version: REPLACEME
36273630 pr-url: https://github.com/nodejs/node/pull/52345
36283631 description: Documentation-only deprecation.
36293632-->
36303633
3631- Type: Documentation-only (supports [ ` --pending-deprecation ` ] [ ] )
3634+ Type: Runtime
36323635
36333636Applications that intend to use authentication tags that are shorter than the
3634- default authentication tag length should set the ` authTagLength ` option of the
3637+ default authentication tag length must set the ` authTagLength ` option of the
36353638[ ` crypto.createDecipheriv() ` ] [ ] function to the appropriate length.
36363639
36373640For ciphers in GCM mode, the [ ` decipher.setAuthTag() ` ] [ ] function accepts
Original file line number Diff line number Diff line change @@ -698,8 +698,7 @@ void CipherBase::SetAuthTag(const FunctionCallbackInfo<Value>& args) {
698698 }
699699
700700 if (mode == EVP_CIPH_GCM_MODE && cipher->auth_tag_len_ == kNoAuthTagLength &&
701- tag_len != 16 && env->options ()->pending_deprecation &&
702- env->EmitProcessEnvWarning ()) {
701+ tag_len != 16 && env->EmitProcessEnvWarning ()) {
703702 if (ProcessEmitDeprecationWarning (
704703 env,
705704 " Using AES-GCM authentication tags of less than 128 bits without "
Original file line number Diff line number Diff line change 1- // Flags: --pending-deprecation
21'use strict' ;
32const common = require ( '../common' ) ;
43if ( ! common . hasCrypto )
You can’t perform that action at this time.
0 commit comments