diff options
author | James M Snell <jasnell@gmail.com> | 2018-01-23 16:32:19 -0800 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-02-02 07:50:31 -0800 |
commit | 6e7992e8b89b55253e43181b4910e6cdbd01318f (patch) | |
tree | ae95f866953293f900c2fe8f3fa8fdc0d26b35ab /doc | |
parent | a89d215b79cc1aa300e25be13aa2489a2322f1ad (diff) | |
download | android-node-v8-6e7992e8b89b55253e43181b4910e6cdbd01318f.tar.gz android-node-v8-6e7992e8b89b55253e43181b4910e6cdbd01318f.tar.bz2 android-node-v8-6e7992e8b89b55253e43181b4910e6cdbd01318f.zip |
crypto: docs-only deprecate crypto.fips, replace
Docs-only deprecate the getter/setter crypto.fips and replace
with crypto.setFips() and crypto.getFips()
This is specifically in preparation for ESM module support
PR-URL: https://github.com/nodejs/node/pull/18335
Refs: https://github.com/nodejs/node/pull/18131
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/crypto.md | 21 | ||||
-rw-r--r-- | doc/api/deprecations.md | 8 |
2 files changed, 29 insertions, 0 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 5e2af21dab..a06a6d1b4e 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1239,11 +1239,15 @@ This property is deprecated. ### crypto.fips <!-- YAML added: v6.0.0 +deprecated: REPLACEME --> Property for checking and controlling whether a FIPS compliant crypto provider is currently in use. Setting to true requires a FIPS build of Node.js. +This property is deprecated. Please use `crypto.setFips()` and +`crypto.getFips()` instead. + ### crypto.createCipher(algorithm, password[, options]) <!-- YAML added: v0.1.94 @@ -1576,6 +1580,14 @@ const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); console.log(aliceSecret === bobSecret); ``` +### crypto.getFips() +<!-- YAML +added: REPLACEME +--> + +Returns `true` if and only if a FIPS compliant crypto provider is +currently in use. + ### crypto.getHashes() <!-- YAML added: v0.9.3 @@ -1999,6 +2011,15 @@ is a bit field taking one of or a mix of the following flags (defined in * `crypto.constants.ENGINE_METHOD_ALL` * `crypto.constants.ENGINE_METHOD_NONE` +### crypto.setFips(bool) +<!-- YAML +added: REPLACEME +--> +* `bool` {boolean} `true` to enable FIPS mode. + +Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. +Throws an error if FIPS mode is not available. + ### crypto.timingSafeEqual(a, b) <!-- YAML added: v6.6.0 diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 1f762f3934..797c3f0f9d 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -840,6 +840,13 @@ Assigning properties to the top-level `this` as an alternative to `module.exports` is deprecated. Developers should use `exports` or `module.exports` instead. +### DEP00XX: crypto.fips is deprecated and replaced. + +Type: Documentation-only + +The [`crypto.fips`][] property is deprecated. Please use `crypto.setFips()` +and `crypto.getFips()` instead. + [`--pending-deprecation`]: cli.html#cli_pending_deprecation [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size [`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array @@ -855,6 +862,7 @@ or `module.exports` instead. [`console.log()`]: console.html#console_console_log_data_args [`crypto.createCredentials()`]: crypto.html#crypto_crypto_createcredentials_details [`crypto.DEFAULT_ENCODING`]: crypto.html#crypto_crypto_default_encoding +[`crypto.fips`]: crypto.html#crypto_crypto_fips [`crypto.pbkdf2()`]: crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback [`decipher.setAuthTag()`]: crypto.html#crypto_decipher_setauthtag_buffer [`domain`]: domain.html |