Skip to content

Commit 47f2f45

Browse files
TrottBethGriggs
authored andcommitted
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: #34697 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 3bfe199 commit 47f2f45

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

doc/api/crypto.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ console.log(Certificate.verifySpkac(Buffer.from(spkac)));
106106

107107
### Legacy API
108108

109-
As a still supported legacy interface, it is possible to create new instances of
109+
> Stability: 0 - Deprecated
110+
111+
As a legacy interface, it is possible to create new instances of
110112
the `crypto.Certificate` class as illustrated in the examples below.
111113

112114
#### `new crypto.Certificate()`

doc/api/deprecations.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2753,6 +2753,20 @@ Type: Documentation-only
27532753

27542754
[`socket.bufferSize`][] is just an alias for [`writable.writableLength`][].
27552755

2756+
<a id="DEP0XXX"></a>
2757+
### DEP0XXX: `new crypto.Certificate()`
2758+
<!-- YAML
2759+
changes:
2760+
- version: REPLACEME
2761+
pr-url: https://github.com/nodejs/node/pull/34697
2762+
description: Documentation-only deprecation.
2763+
-->
2764+
2765+
Type: Documentation-only
2766+
2767+
The [`crypto.Certificate()` constructor][] is deprecated. Use
2768+
[static methods of `crypto.Certificate()`][] instead.
2769+
27562770
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
27572771
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
27582772
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_static_method_buffer_allocunsafeslow_size
@@ -2776,6 +2790,7 @@ Type: Documentation-only
27762790
[`clearTimeout()`]: timers.html#timers_cleartimeout_timeout
27772791
[`console.error()`]: console.html#console_console_error_data_args
27782792
[`console.log()`]: console.html#console_console_log_data_args
2793+
[`crypto.Certificate()` constructor]: crypto.html#crypto_legacy_api
27792794
[`crypto.DEFAULT_ENCODING`]: crypto.html#crypto_crypto_default_encoding
27802795
[`crypto.createCipher()`]: crypto.html#crypto_crypto_createcipher_algorithm_password_options
27812796
[`crypto.createCipheriv()`]: crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options
@@ -2875,3 +2890,4 @@ Type: Documentation-only
28752890
[from_arraybuffer]: buffer.html#buffer_static_method_buffer_from_arraybuffer_byteoffset_length
28762891
[from_string_encoding]: buffer.html#buffer_static_method_buffer_from_string_encoding
28772892
[legacy `urlObject`]: url.html#url_legacy_urlobject
2893+
[static methods of `crypto.Certificate()`]: crypto.html#crypto_class_certificate

0 commit comments

Comments
 (0)