Skip to content

Commit ca5ff72

Browse files
committed
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 60d572c commit ca5ff72

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
@@ -2776,6 +2776,20 @@ Type: Documentation-only
27762776

27772777
[`socket.bufferSize`][] is just an alias for [`writable.writableLength`][].
27782778

2779+
<a id="DEP0XXX"></a>
2780+
### DEP0XXX: `new crypto.Certificate()`
2781+
<!-- YAML
2782+
changes:
2783+
- version: REPLACEME
2784+
pr-url: https://github.com/nodejs/node/pull/34697
2785+
description: Documentation-only deprecation.
2786+
-->
2787+
2788+
Type: Documentation-only
2789+
2790+
The [`crypto.Certificate()` constructor][] is deprecated. Use
2791+
[static methods of `crypto.Certificate()`][] instead.
2792+
27792793
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
27802794
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
27812795
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_static_method_buffer_allocunsafeslow_size
@@ -2798,6 +2812,7 @@ Type: Documentation-only
27982812
[`clearTimeout()`]: timers.html#timers_cleartimeout_timeout
27992813
[`console.error()`]: console.html#console_console_error_data_args
28002814
[`console.log()`]: console.html#console_console_log_data_args
2815+
[`crypto.Certificate()` constructor]: crypto.html#crypto_legacy_api
28012816
[`crypto.DEFAULT_ENCODING`]: crypto.html#crypto_crypto_default_encoding
28022817
[`crypto.createCipher()`]: crypto.html#crypto_crypto_createcipher_algorithm_password_options
28032818
[`crypto.createCipheriv()`]: crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options
@@ -2897,3 +2912,4 @@ Type: Documentation-only
28972912
[from_arraybuffer]: buffer.html#buffer_static_method_buffer_from_arraybuffer_byteoffset_length
28982913
[from_string_encoding]: buffer.html#buffer_static_method_buffer_from_string_encoding
28992914
[legacy `urlObject`]: url.html#url_legacy_urlobject
2915+
[static methods of `crypto.Certificate()`]: crypto.html#crypto_class_certificate

0 commit comments

Comments
 (0)