doc: deprecate (doc-only) crypto.Certificate()

Documentation-only: Recommend people use the static methods on
crypto.Certificate() and not the legacy API constructor.

PR-URL: https://github.com/nodejs/node/pull/34697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
Rich Trott authored and Beth Griggs committed 2020-08-20 15:05:21 +01:00
1 parent 3bfe199c28
commit 47f2f45dd8
2 files changed
+19 -1

No files matched your search

+3 -1
View File
@@ -106,7 +106,9 @@ console.log(Certificate.verifySpkac(Buffer.from(spkac)));
### Legacy API
As a still supported legacy interface, it is possible to create new instances of
> Stability: 0 - Deprecated
As a legacy interface, it is possible to create new instances of
the `crypto.Certificate` class as illustrated in the examples below.
#### `new crypto.Certificate()`
+16
View File
@@ -2753,6 +2753,20 @@ Type: Documentation-only
[`socket.bufferSize`][] is just an alias for [`writable.writableLength`][].
<a id="DEP0XXX"></a>
### DEP0XXX: `new crypto.Certificate()`
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/34697
description: Documentation-only deprecation.
-->
Type: Documentation-only
The [`crypto.Certificate()` constructor][] is deprecated. Use
[static methods of `crypto.Certificate()`][] instead.
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_static_method_buffer_allocunsafeslow_size
@@ -2776,6 +2790,7 @@ Type: Documentation-only
[`clearTimeout()`]: timers.html#timers_cleartimeout_timeout
[`console.error()`]: console.html#console_console_error_data_args
[`console.log()`]: console.html#console_console_log_data_args
[`crypto.Certificate()` constructor]: crypto.html#crypto_legacy_api
[`crypto.DEFAULT_ENCODING`]: crypto.html#crypto_crypto_default_encoding
[`crypto.createCipher()`]: crypto.html#crypto_crypto_createcipher_algorithm_password_options
[`crypto.createCipheriv()`]: crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options
@@ -2875,3 +2890,4 @@ Type: Documentation-only
[from_arraybuffer]: buffer.html#buffer_static_method_buffer_from_arraybuffer_byteoffset_length
[from_string_encoding]: buffer.html#buffer_static_method_buffer_from_string_encoding
[legacy `urlObject`]: url.html#url_legacy_urlobject
[static methods of `crypto.Certificate()`]: crypto.html#crypto_class_certificate