From 47f2f45dd84e8dfa60131b331ec8fefbaec629f4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 16 Aug 2020 09:54:27 -0700 Subject: [PATCH] doc: deprecate (doc-only) crypto.Certificate() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Ujjwal Sharma Reviewed-By: Tobias Nießen --- doc/api/crypto.md | 4 +++- doc/api/deprecations.md | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 08fc4fa9f35791..dde7efa9e0db3e 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -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()` diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index c7583e3a9e97ba..d0e2c6d0b26745 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2753,6 +2753,20 @@ Type: Documentation-only [`socket.bufferSize`][] is just an alias for [`writable.writableLength`][]. + +### DEP0XXX: `new crypto.Certificate()` + + +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