aws-delivlib 15.4.1 → 15.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/custom-resource-handlers/src/certificate-signing-request.tsbuildinfo +1 -1
- package/lib/custom-resource-handlers/src/pgp-secret.tsbuildinfo +1 -1
- package/lib/custom-resource-handlers/src/private-key.tsbuildinfo +1 -1
- package/lib/package-integrity/handler/validate.bundle.js +11361 -9248
- package/lib/publishing/github/node_modules/.yarn-integrity +5 -5
- package/lib/publishing/github/node_modules/@types/aws-lambda/README.md +1 -1
- package/lib/publishing/github/node_modules/@types/aws-lambda/package.json +2 -2
- package/lib/publishing/github/node_modules/@types/aws-lambda/trigger/api-gateway-proxy.d.ts +2 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/README.md +3 -3
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert/strict.d.ts +13 -56
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/assert.d.ts +189 -190
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/async_hooks.d.ts +151 -43
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.buffer.d.ts +12 -13
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/buffer.d.ts +103 -237
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/child_process.d.ts +40 -155
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/cluster.d.ts +238 -384
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/console.d.ts +45 -404
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/constants.d.ts +3 -10
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/crypto.d.ts +1019 -1600
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dgram.d.ts +133 -81
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/diagnostics_channel.d.ts +277 -59
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns/promises.d.ts +9 -15
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/dns.d.ts +136 -183
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/domain.d.ts +12 -32
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/events.d.ts +872 -840
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ffi.d.ts +500 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs/promises.d.ts +256 -85
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/fs.d.ts +865 -525
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.d.ts +12 -34
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/globals.typedarray.d.ts +63 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http.d.ts +433 -312
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/http2.d.ts +548 -893
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/https.d.ts +64 -243
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/index.d.ts +25 -7
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.d.ts +70 -58
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/inspector.generated.d.ts +764 -410
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/module.d.ts +54 -219
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/net.d.ts +224 -226
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/os.d.ts +41 -49
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/package.json +13 -18
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/posix.d.ts +8 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path/win32.d.ts +8 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/path.d.ts +119 -141
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/perf_hooks.d.ts +339 -690
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/process.d.ts +390 -205
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/punycode.d.ts +3 -31
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/querystring.d.ts +3 -16
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/quic.d.ts +2191 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline/promises.d.ts +3 -6
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/readline.d.ts +66 -152
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/repl.d.ts +101 -109
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sea.d.ts +1 -116
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/sqlite.d.ts +486 -68
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/consumers.d.ts +91 -15
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/iter.d.ts +449 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream/web.d.ts +197 -454
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/stream.d.ts +603 -491
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/string_decoder.d.ts +3 -43
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test/reporters.d.ts +60 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/test.d.ts +585 -292
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers/promises.d.ts +3 -18
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/timers.d.ts +3 -141
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tls.d.ts +180 -267
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/trace_events.d.ts +3 -97
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -8
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +2 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.6/index.d.ts +26 -6
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/ts5.7/index.d.ts +118 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tty.d.ts +61 -43
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/url.d.ts +156 -584
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/util/types.d.ts +558 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/util.d.ts +173 -1099
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/v8.d.ts +175 -36
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/vfs.d.ts +211 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/vm.d.ts +293 -209
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/wasi.d.ts +24 -74
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/fetch.d.ts +14 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/navigator.d.ts +3 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/streams.d.ts +97 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/worker_threads.d.ts +260 -407
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/zlib.d.ts +782 -165
- package/lib/publishing/github/node_modules/semver/classes/range.js +2 -2
- package/lib/publishing/github/node_modules/semver/internal/constants.js +30 -0
- package/lib/publishing/github/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/lib/publishing/github/node_modules/semver/package.json +1 -1
- package/lib/publishing/github/node_modules/undici-types/agent.d.ts +12 -13
- package/lib/publishing/github/node_modules/undici-types/api.d.ts +26 -26
- package/lib/publishing/github/node_modules/undici-types/balanced-pool.d.ts +13 -12
- package/lib/publishing/github/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/lib/publishing/github/node_modules/undici-types/client-stats.d.ts +15 -0
- package/lib/publishing/github/node_modules/undici-types/client.d.ts +63 -37
- package/lib/publishing/github/node_modules/undici-types/connector.d.ts +5 -2
- package/lib/publishing/github/node_modules/undici-types/cookies.d.ts +3 -1
- package/lib/publishing/github/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
- package/lib/publishing/github/node_modules/undici-types/dispatcher.d.ts +136 -139
- package/lib/publishing/github/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
- package/lib/publishing/github/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
- package/lib/publishing/github/node_modules/undici-types/errors.d.ts +92 -54
- package/lib/publishing/github/node_modules/undici-types/eventsource.d.ts +9 -4
- package/lib/publishing/github/node_modules/undici-types/fetch.d.ts +51 -25
- package/lib/publishing/github/node_modules/undici-types/formdata.d.ts +7 -7
- package/lib/publishing/github/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/lib/publishing/github/node_modules/undici-types/global-origin.d.ts +5 -5
- package/lib/publishing/github/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/lib/publishing/github/node_modules/undici-types/handlers.d.ts +10 -9
- package/lib/publishing/github/node_modules/undici-types/header.d.ts +162 -1
- package/lib/publishing/github/node_modules/undici-types/index.d.ts +69 -47
- package/lib/publishing/github/node_modules/undici-types/interceptors.d.ts +72 -9
- package/lib/publishing/github/node_modules/undici-types/mock-agent.d.ts +36 -18
- package/lib/publishing/github/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/lib/publishing/github/node_modules/undici-types/mock-client.d.ts +6 -4
- package/lib/publishing/github/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/lib/publishing/github/node_modules/undici-types/mock-interceptor.d.ts +26 -21
- package/lib/publishing/github/node_modules/undici-types/mock-pool.d.ts +6 -4
- package/lib/publishing/github/node_modules/undici-types/package.json +1 -1
- package/lib/publishing/github/node_modules/undici-types/patch.d.ts +0 -4
- package/lib/publishing/github/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/lib/publishing/github/node_modules/undici-types/pool.d.ts +14 -14
- package/lib/publishing/github/node_modules/undici-types/proxy-agent.d.ts +14 -6
- package/lib/publishing/github/node_modules/undici-types/readable.d.ts +19 -16
- package/lib/publishing/github/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/lib/publishing/github/node_modules/undici-types/retry-handler.d.ts +19 -10
- package/lib/publishing/github/node_modules/undici-types/round-robin-pool.d.ts +39 -0
- package/lib/publishing/github/node_modules/undici-types/snapshot-agent.d.ts +113 -0
- package/lib/publishing/github/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/lib/publishing/github/node_modules/undici-types/util.d.ts +3 -3
- package/lib/publishing/github/node_modules/undici-types/utility.d.ts +7 -0
- package/lib/publishing/github/node_modules/undici-types/webidl.d.ts +148 -30
- package/lib/publishing/github/node_modules/undici-types/websocket.d.ts +48 -10
- package/lib/shellable.d.ts +7 -3
- package/lib/shellable.js +37 -27
- package/package.json +11 -11
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
- package/lib/publishing/github/node_modules/undici-types/file.d.ts +0 -39
- package/lib/publishing/github/node_modules/undici-types/filereader.d.ts +0 -54
package/lib/publishing/github/node_modules/@types/jsonwebtoken/node_modules/@types/node/tls.d.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* The `node:tls` module provides an implementation of the Transport Layer Security
|
|
3
|
-
* (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL.
|
|
4
|
-
* The module can be accessed using:
|
|
5
|
-
*
|
|
6
|
-
* ```js
|
|
7
|
-
* import tls from 'node:tls';
|
|
8
|
-
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/tls.js)
|
|
10
|
-
*/
|
|
11
|
-
declare module "tls" {
|
|
1
|
+
declare module "node:tls" {
|
|
12
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
13
3
|
import { X509Certificate } from "node:crypto";
|
|
14
4
|
import * as net from "node:net";
|
|
@@ -200,12 +190,13 @@ declare module "tls" {
|
|
|
200
190
|
* An optional Buffer instance containing a TLS session.
|
|
201
191
|
*/
|
|
202
192
|
session?: Buffer | undefined;
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
193
|
+
}
|
|
194
|
+
interface TLSSocketEventMap extends net.SocketEventMap {
|
|
195
|
+
"keylog": [line: NonSharedBuffer];
|
|
196
|
+
"OCSPResponse": [response: NonSharedBuffer];
|
|
197
|
+
"secure": [];
|
|
198
|
+
"secureConnect": [];
|
|
199
|
+
"session": [session: NonSharedBuffer];
|
|
209
200
|
}
|
|
210
201
|
/**
|
|
211
202
|
* Performs transparent encryption of written data and all required TLS
|
|
@@ -228,6 +219,13 @@ declare module "tls" {
|
|
|
228
219
|
* @since v0.11.4
|
|
229
220
|
*/
|
|
230
221
|
authorized: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* The negotiated ALPN protocol. This is `null` before the handshake completes.
|
|
224
|
+
* Once the handshake completes, it settles as either the negotiated protocol
|
|
225
|
+
* name, or `false` if the peers did not negotiate an ALPN protocol.
|
|
226
|
+
* @since v6.0.0
|
|
227
|
+
*/
|
|
228
|
+
alpnProtocol: string | false | null;
|
|
231
229
|
/**
|
|
232
230
|
* Returns the reason why the peer's certificate was not been verified. This
|
|
233
231
|
* property is set only when `tlsSocket.authorized === false`.
|
|
@@ -239,16 +237,6 @@ declare module "tls" {
|
|
|
239
237
|
* @since v0.11.4
|
|
240
238
|
*/
|
|
241
239
|
encrypted: true;
|
|
242
|
-
/**
|
|
243
|
-
* String containing the selected ALPN protocol.
|
|
244
|
-
* Before a handshake has completed, this value is always null.
|
|
245
|
-
* When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
|
|
246
|
-
*/
|
|
247
|
-
alpnProtocol: string | false | null;
|
|
248
|
-
/**
|
|
249
|
-
* String containing the server name requested via SNI (Server Name Indication) TLS extension.
|
|
250
|
-
*/
|
|
251
|
-
servername: string | false | null;
|
|
252
240
|
/**
|
|
253
241
|
* Returns an object representing the local certificate. The returned object has
|
|
254
242
|
* some properties corresponding to the fields of the certificate.
|
|
@@ -279,11 +267,19 @@ declare module "tls" {
|
|
|
279
267
|
*/
|
|
280
268
|
getCipher(): CipherNameAndProtocol;
|
|
281
269
|
/**
|
|
282
|
-
* Returns an object
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
270
|
+
* Returns an object describing ephemeral key agreement in [perfect forward
|
|
271
|
+
* secrecy](https://nodejs.org/docs/latest-v26.x/api/tls.html#perfect-forward-secrecy) on a client connection. It returns an empty object when the key
|
|
272
|
+
* agreement is not ephemeral. As this is only supported on a client socket;
|
|
273
|
+
* `null` is returned if called on a server socket. The supported types are `'DH'`,
|
|
274
|
+
* `'ECDH'`, and `'TLSGroup'`. For `'DH'` and `'ECDH'`, the object describes peer
|
|
275
|
+
* temporary key parameters. For `'TLSGroup'`, the object identifies the negotiated
|
|
276
|
+
* TLS Supported Group used for key agreement when a peer temporary key object is
|
|
277
|
+
* not available.
|
|
278
|
+
*
|
|
279
|
+
* The `name` property is available only when type is `'ECDH'` or `'TLSGroup'`. The
|
|
280
|
+
* `size` property is not available when type is `'TLSGroup'`. For `'TLSGroup'`,
|
|
281
|
+
* `name` is the negotiated TLS Supported Group name. Standardized TLS group names
|
|
282
|
+
* and code points are listed in the [IANA TLS Supported Groups registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8).
|
|
287
283
|
*
|
|
288
284
|
* For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`.
|
|
289
285
|
* @since v5.0.0
|
|
@@ -403,6 +399,13 @@ declare module "tls" {
|
|
|
403
399
|
},
|
|
404
400
|
callback: (err: Error | null) => void,
|
|
405
401
|
): undefined | boolean;
|
|
402
|
+
/**
|
|
403
|
+
* The SNI (Server Name Indication) host name associated with the socket. This is
|
|
404
|
+
* `null` before the handshake completes. Once the handshake completes it settles
|
|
405
|
+
* as either the host name string, or `false` if SNI was not used.
|
|
406
|
+
* @since v0.11.3
|
|
407
|
+
*/
|
|
408
|
+
servername: string | false | null;
|
|
406
409
|
/**
|
|
407
410
|
* The `tlsSocket.setKeyCert()` method sets the private key and certificate to use for the socket.
|
|
408
411
|
* This is mainly useful if you wish to select a server certificate from a TLS server's `ALPNCallback`.
|
|
@@ -484,36 +487,48 @@ declare module "tls" {
|
|
|
484
487
|
* @return requested bytes of the keying material
|
|
485
488
|
*/
|
|
486
489
|
exportKeyingMaterial(length: number, label: string, context: Buffer): NonSharedBuffer;
|
|
487
|
-
|
|
488
|
-
addListener
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
emit(
|
|
494
|
-
emit(
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
once(
|
|
507
|
-
|
|
508
|
-
prependListener
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
prependOnceListener
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
490
|
+
// #region InternalEventEmitter
|
|
491
|
+
addListener<E extends keyof TLSSocketEventMap>(
|
|
492
|
+
eventName: E,
|
|
493
|
+
listener: (...args: TLSSocketEventMap[E]) => void,
|
|
494
|
+
): this;
|
|
495
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
496
|
+
emit<E extends keyof TLSSocketEventMap>(eventName: E, ...args: TLSSocketEventMap[E]): boolean;
|
|
497
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
498
|
+
listenerCount<E extends keyof TLSSocketEventMap>(
|
|
499
|
+
eventName: E,
|
|
500
|
+
listener?: (...args: TLSSocketEventMap[E]) => void,
|
|
501
|
+
): number;
|
|
502
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
503
|
+
listeners<E extends keyof TLSSocketEventMap>(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[];
|
|
504
|
+
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
505
|
+
off<E extends keyof TLSSocketEventMap>(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this;
|
|
506
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
507
|
+
on<E extends keyof TLSSocketEventMap>(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this;
|
|
508
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
509
|
+
once<E extends keyof TLSSocketEventMap>(eventName: E, listener: (...args: TLSSocketEventMap[E]) => void): this;
|
|
510
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
511
|
+
prependListener<E extends keyof TLSSocketEventMap>(
|
|
512
|
+
eventName: E,
|
|
513
|
+
listener: (...args: TLSSocketEventMap[E]) => void,
|
|
514
|
+
): this;
|
|
515
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
516
|
+
prependOnceListener<E extends keyof TLSSocketEventMap>(
|
|
517
|
+
eventName: E,
|
|
518
|
+
listener: (...args: TLSSocketEventMap[E]) => void,
|
|
519
|
+
): this;
|
|
520
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
521
|
+
rawListeners<E extends keyof TLSSocketEventMap>(eventName: E): ((...args: TLSSocketEventMap[E]) => void)[];
|
|
522
|
+
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
523
|
+
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
524
|
+
removeAllListeners<E extends keyof TLSSocketEventMap>(eventName?: E): this;
|
|
525
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
526
|
+
removeListener<E extends keyof TLSSocketEventMap>(
|
|
527
|
+
eventName: E,
|
|
528
|
+
listener: (...args: TLSSocketEventMap[E]) => void,
|
|
529
|
+
): this;
|
|
530
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
531
|
+
// #endregion
|
|
517
532
|
}
|
|
518
533
|
interface CommonConnectionOptions {
|
|
519
534
|
/**
|
|
@@ -533,8 +548,12 @@ declare module "tls" {
|
|
|
533
548
|
*/
|
|
534
549
|
requestCert?: boolean | undefined;
|
|
535
550
|
/**
|
|
536
|
-
* An array of strings or a Buffer
|
|
537
|
-
*
|
|
551
|
+
* An array of strings, or a single `Buffer`, `TypedArray`, or `DataView` containing the supported
|
|
552
|
+
* ALPN protocols. Buffers should have the format `[len][name][len][name]...`
|
|
553
|
+
* e.g. `'\x08http/1.1\x08http/1.0'`, where the `len` byte is the length of the
|
|
554
|
+
* next protocol name. Passing an array is usually much simpler, e.g.
|
|
555
|
+
* `['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher
|
|
556
|
+
* preference than those later.
|
|
538
557
|
*/
|
|
539
558
|
ALPNProtocols?: readonly string[] | NodeJS.ArrayBufferView | undefined;
|
|
540
559
|
/**
|
|
@@ -554,6 +573,12 @@ declare module "tls" {
|
|
|
554
573
|
* @default true
|
|
555
574
|
*/
|
|
556
575
|
rejectUnauthorized?: boolean | undefined;
|
|
576
|
+
/**
|
|
577
|
+
* If true, specifies that the OCSP status request extension will be
|
|
578
|
+
* added to the client hello and an 'OCSPResponse' event will be
|
|
579
|
+
* emitted on the socket before establishing a secure communication.
|
|
580
|
+
*/
|
|
581
|
+
requestOCSP?: boolean | undefined;
|
|
557
582
|
}
|
|
558
583
|
interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts {
|
|
559
584
|
/**
|
|
@@ -634,6 +659,19 @@ declare module "tls" {
|
|
|
634
659
|
*/
|
|
635
660
|
pskCallback?: ((hint: string | null) => PSKCallbackNegotation | null) | undefined;
|
|
636
661
|
}
|
|
662
|
+
interface ServerEventMap extends net.ServerEventMap {
|
|
663
|
+
"connection": [socket: net.Socket];
|
|
664
|
+
"keylog": [line: NonSharedBuffer, tlsSocket: TLSSocket];
|
|
665
|
+
"newSession": [sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void];
|
|
666
|
+
"OCSPRequest": [
|
|
667
|
+
certificate: NonSharedBuffer,
|
|
668
|
+
issuer: NonSharedBuffer,
|
|
669
|
+
callback: (err: Error | null, resp: Buffer | null) => void,
|
|
670
|
+
];
|
|
671
|
+
"resumeSession": [sessionId: Buffer, callback: (err: Error | null, sessionData?: Buffer) => void];
|
|
672
|
+
"secureConnection": [tlsSocket: TLSSocket];
|
|
673
|
+
"tlsClientError": [exception: Error, tlsSocket: TLSSocket];
|
|
674
|
+
}
|
|
637
675
|
/**
|
|
638
676
|
* Accepts encrypted connections using TLS or SSL.
|
|
639
677
|
* @since v0.3.2
|
|
@@ -679,160 +717,48 @@ declare module "tls" {
|
|
|
679
717
|
* @param keys A 48-byte buffer containing the session ticket keys.
|
|
680
718
|
*/
|
|
681
719
|
setTicketKeys(keys: Buffer): void;
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
): this;
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
) => void,
|
|
704
|
-
): this;
|
|
705
|
-
addListener(
|
|
706
|
-
event: "resumeSession",
|
|
707
|
-
listener: (
|
|
708
|
-
sessionId: NonSharedBuffer,
|
|
709
|
-
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
710
|
-
) => void,
|
|
711
|
-
): this;
|
|
712
|
-
addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
713
|
-
addListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
|
714
|
-
emit(event: string | symbol, ...args: any[]): boolean;
|
|
715
|
-
emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean;
|
|
716
|
-
emit(
|
|
717
|
-
event: "newSession",
|
|
718
|
-
sessionId: NonSharedBuffer,
|
|
719
|
-
sessionData: NonSharedBuffer,
|
|
720
|
-
callback: () => void,
|
|
721
|
-
): boolean;
|
|
722
|
-
emit(
|
|
723
|
-
event: "OCSPRequest",
|
|
724
|
-
certificate: NonSharedBuffer,
|
|
725
|
-
issuer: NonSharedBuffer,
|
|
726
|
-
callback: (err: Error | null, resp: Buffer | null) => void,
|
|
727
|
-
): boolean;
|
|
728
|
-
emit(
|
|
729
|
-
event: "resumeSession",
|
|
730
|
-
sessionId: NonSharedBuffer,
|
|
731
|
-
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
732
|
-
): boolean;
|
|
733
|
-
emit(event: "secureConnection", tlsSocket: TLSSocket): boolean;
|
|
734
|
-
emit(event: "keylog", line: NonSharedBuffer, tlsSocket: TLSSocket): boolean;
|
|
735
|
-
on(event: string, listener: (...args: any[]) => void): this;
|
|
736
|
-
on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
737
|
-
on(
|
|
738
|
-
event: "newSession",
|
|
739
|
-
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
|
740
|
-
): this;
|
|
741
|
-
on(
|
|
742
|
-
event: "OCSPRequest",
|
|
743
|
-
listener: (
|
|
744
|
-
certificate: NonSharedBuffer,
|
|
745
|
-
issuer: NonSharedBuffer,
|
|
746
|
-
callback: (err: Error | null, resp: Buffer | null) => void,
|
|
747
|
-
) => void,
|
|
748
|
-
): this;
|
|
749
|
-
on(
|
|
750
|
-
event: "resumeSession",
|
|
751
|
-
listener: (
|
|
752
|
-
sessionId: NonSharedBuffer,
|
|
753
|
-
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
754
|
-
) => void,
|
|
755
|
-
): this;
|
|
756
|
-
on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
757
|
-
on(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
|
758
|
-
once(event: string, listener: (...args: any[]) => void): this;
|
|
759
|
-
once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
760
|
-
once(
|
|
761
|
-
event: "newSession",
|
|
762
|
-
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
|
763
|
-
): this;
|
|
764
|
-
once(
|
|
765
|
-
event: "OCSPRequest",
|
|
766
|
-
listener: (
|
|
767
|
-
certificate: NonSharedBuffer,
|
|
768
|
-
issuer: NonSharedBuffer,
|
|
769
|
-
callback: (err: Error | null, resp: Buffer | null) => void,
|
|
770
|
-
) => void,
|
|
771
|
-
): this;
|
|
772
|
-
once(
|
|
773
|
-
event: "resumeSession",
|
|
774
|
-
listener: (
|
|
775
|
-
sessionId: NonSharedBuffer,
|
|
776
|
-
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
777
|
-
) => void,
|
|
778
|
-
): this;
|
|
779
|
-
once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
780
|
-
once(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
|
781
|
-
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
782
|
-
prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
783
|
-
prependListener(
|
|
784
|
-
event: "newSession",
|
|
785
|
-
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
|
786
|
-
): this;
|
|
787
|
-
prependListener(
|
|
788
|
-
event: "OCSPRequest",
|
|
789
|
-
listener: (
|
|
790
|
-
certificate: NonSharedBuffer,
|
|
791
|
-
issuer: NonSharedBuffer,
|
|
792
|
-
callback: (err: Error | null, resp: Buffer | null) => void,
|
|
793
|
-
) => void,
|
|
794
|
-
): this;
|
|
795
|
-
prependListener(
|
|
796
|
-
event: "resumeSession",
|
|
797
|
-
listener: (
|
|
798
|
-
sessionId: NonSharedBuffer,
|
|
799
|
-
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
800
|
-
) => void,
|
|
720
|
+
// #region InternalEventEmitter
|
|
721
|
+
addListener<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap[E]) => void): this;
|
|
722
|
+
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
723
|
+
emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap[E]): boolean;
|
|
724
|
+
emit(eventName: string | symbol, ...args: any[]): boolean;
|
|
725
|
+
listenerCount<E extends keyof ServerEventMap>(
|
|
726
|
+
eventName: E,
|
|
727
|
+
listener?: (...args: ServerEventMap[E]) => void,
|
|
728
|
+
): number;
|
|
729
|
+
listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
|
|
730
|
+
listeners<E extends keyof ServerEventMap>(eventName: E): ((...args: ServerEventMap[E]) => void)[];
|
|
731
|
+
listeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
732
|
+
off<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap[E]) => void): this;
|
|
733
|
+
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
734
|
+
on<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap[E]) => void): this;
|
|
735
|
+
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
736
|
+
once<E extends keyof ServerEventMap>(eventName: E, listener: (...args: ServerEventMap[E]) => void): this;
|
|
737
|
+
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
738
|
+
prependListener<E extends keyof ServerEventMap>(
|
|
739
|
+
eventName: E,
|
|
740
|
+
listener: (...args: ServerEventMap[E]) => void,
|
|
801
741
|
): this;
|
|
802
|
-
prependListener(
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
prependOnceListener(
|
|
807
|
-
event: "newSession",
|
|
808
|
-
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
|
|
742
|
+
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
743
|
+
prependOnceListener<E extends keyof ServerEventMap>(
|
|
744
|
+
eventName: E,
|
|
745
|
+
listener: (...args: ServerEventMap[E]) => void,
|
|
809
746
|
): this;
|
|
810
|
-
prependOnceListener(
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
747
|
+
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
748
|
+
rawListeners<E extends keyof ServerEventMap>(eventName: E): ((...args: ServerEventMap[E]) => void)[];
|
|
749
|
+
rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
|
|
750
|
+
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
751
|
+
removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
|
|
752
|
+
removeAllListeners(eventName?: string | symbol): this;
|
|
753
|
+
removeListener<E extends keyof ServerEventMap>(
|
|
754
|
+
eventName: E,
|
|
755
|
+
listener: (...args: ServerEventMap[E]) => void,
|
|
817
756
|
): this;
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
listener: (
|
|
821
|
-
sessionId: NonSharedBuffer,
|
|
822
|
-
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
823
|
-
) => void,
|
|
824
|
-
): this;
|
|
825
|
-
prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
826
|
-
prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this;
|
|
827
|
-
}
|
|
828
|
-
/**
|
|
829
|
-
* @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
|
|
830
|
-
*/
|
|
831
|
-
interface SecurePair {
|
|
832
|
-
encrypted: TLSSocket;
|
|
833
|
-
cleartext: TLSSocket;
|
|
757
|
+
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
758
|
+
// #endregion
|
|
834
759
|
}
|
|
835
760
|
type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1";
|
|
761
|
+
type CertificateCompressionAlgorithm = "zlib" | "brotli" | "zstd";
|
|
836
762
|
interface SecureContextOptions {
|
|
837
763
|
/**
|
|
838
764
|
* If set, this will be called when a client opens a connection using the ALPN extension.
|
|
@@ -869,6 +795,15 @@ declare module "tls" {
|
|
|
869
795
|
* able to validate the certificate, and the handshake will fail.
|
|
870
796
|
*/
|
|
871
797
|
cert?: string | Buffer | Array<string | Buffer> | undefined;
|
|
798
|
+
/**
|
|
799
|
+
* An array of supported certificate
|
|
800
|
+
* compression algorithm names, in preference order. Supported values are
|
|
801
|
+
* `'zlib'`, `'brotli'`, and `'zstd'`. When set, enables TLS certificate
|
|
802
|
+
* compression ([RFC 8879](https://tools.ietf.org/html/rfc8879)) which compresses certificates during the TLS
|
|
803
|
+
* handshake, reducing handshake size. Only effective with TLSv1.3.
|
|
804
|
+
* **Default:** `[]` (disabled).
|
|
805
|
+
*/
|
|
806
|
+
certificateCompression?: readonly CertificateCompressionAlgorithm[] | undefined;
|
|
872
807
|
/**
|
|
873
808
|
* Colon-separated list of supported signature algorithms. The list
|
|
874
809
|
* can contain digest algorithms (SHA256, MD5 etc.), public key
|
|
@@ -899,13 +834,16 @@ declare module "tls" {
|
|
|
899
834
|
*/
|
|
900
835
|
dhparam?: string | Buffer | undefined;
|
|
901
836
|
/**
|
|
902
|
-
* A string describing a named curve
|
|
903
|
-
*
|
|
904
|
-
*
|
|
905
|
-
*
|
|
906
|
-
*
|
|
907
|
-
*
|
|
908
|
-
*
|
|
837
|
+
* A string describing a named curve, TLS group, or
|
|
838
|
+
* colon-separated list of named curves or TLS groups to use for key agreement,
|
|
839
|
+
* for example `P-521:P-384:P-256`, `X25519`, or `X25519MLKEM768`. The
|
|
840
|
+
* historical name of this option refers to ECDH key agreement in TLSv1.2 and
|
|
841
|
+
* below. In TLSv1.3, this option configures the TLS Supported Groups and
|
|
842
|
+
* key share groups offered or accepted by the TLS stack. Set to `auto` to
|
|
843
|
+
* select the group automatically. Use `crypto.getCurves()` to obtain a
|
|
844
|
+
* list of available elliptic curve names. For TLS group names, use
|
|
845
|
+
* `openssl list -tls-groups` or consult the [IANA TLS Supported Groups
|
|
846
|
+
* registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8).
|
|
909
847
|
*/
|
|
910
848
|
ecdhCurve?: string | undefined;
|
|
911
849
|
/**
|
|
@@ -1130,45 +1068,6 @@ declare module "tls" {
|
|
|
1130
1068
|
secureConnectListener?: () => void,
|
|
1131
1069
|
): TLSSocket;
|
|
1132
1070
|
function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
|
|
1133
|
-
/**
|
|
1134
|
-
* Creates a new secure pair object with two streams, one of which reads and writes
|
|
1135
|
-
* the encrypted data and the other of which reads and writes the cleartext data.
|
|
1136
|
-
* Generally, the encrypted stream is piped to/from an incoming encrypted data
|
|
1137
|
-
* stream and the cleartext one is used as a replacement for the initial encrypted
|
|
1138
|
-
* stream.
|
|
1139
|
-
*
|
|
1140
|
-
* `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and `encrypted` stream properties.
|
|
1141
|
-
*
|
|
1142
|
-
* Using `cleartext` has the same API as {@link TLSSocket}.
|
|
1143
|
-
*
|
|
1144
|
-
* The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code:
|
|
1145
|
-
*
|
|
1146
|
-
* ```js
|
|
1147
|
-
* pair = tls.createSecurePair(// ... );
|
|
1148
|
-
* pair.encrypted.pipe(socket);
|
|
1149
|
-
* socket.pipe(pair.encrypted);
|
|
1150
|
-
* ```
|
|
1151
|
-
*
|
|
1152
|
-
* can be replaced by:
|
|
1153
|
-
*
|
|
1154
|
-
* ```js
|
|
1155
|
-
* secureSocket = tls.TLSSocket(socket, options);
|
|
1156
|
-
* ```
|
|
1157
|
-
*
|
|
1158
|
-
* where `secureSocket` has the same API as `pair.cleartext`.
|
|
1159
|
-
* @since v0.3.2
|
|
1160
|
-
* @deprecated Since v0.11.3 - Use {@link TLSSocket} instead.
|
|
1161
|
-
* @param context A secure context object as returned by `tls.createSecureContext()`
|
|
1162
|
-
* @param isServer `true` to specify that this TLS connection should be opened as a server.
|
|
1163
|
-
* @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`.
|
|
1164
|
-
* @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`.
|
|
1165
|
-
*/
|
|
1166
|
-
function createSecurePair(
|
|
1167
|
-
context?: SecureContext,
|
|
1168
|
-
isServer?: boolean,
|
|
1169
|
-
requestCert?: boolean,
|
|
1170
|
-
rejectUnauthorized?: boolean,
|
|
1171
|
-
): SecurePair;
|
|
1172
1071
|
/**
|
|
1173
1072
|
* `{@link createServer}` sets the default value of the `honorCipherOrder` option
|
|
1174
1073
|
* to `true`, other APIs that create secure contexts leave it unset.
|
|
@@ -1225,7 +1124,7 @@ declare module "tls" {
|
|
|
1225
1124
|
* the `ciphers` option of `{@link createSecureContext}`.
|
|
1226
1125
|
*
|
|
1227
1126
|
* Not all supported ciphers are enabled by default. See
|
|
1228
|
-
* [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-
|
|
1127
|
+
* [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v26.x/api/tls.html#modifying-the-default-tls-cipher-suite).
|
|
1229
1128
|
*
|
|
1230
1129
|
* Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for
|
|
1231
1130
|
* TLSv1.2 and below.
|
|
@@ -1236,6 +1135,20 @@ declare module "tls" {
|
|
|
1236
1135
|
* @since v0.10.2
|
|
1237
1136
|
*/
|
|
1238
1137
|
function getCiphers(): string[];
|
|
1138
|
+
/**
|
|
1139
|
+
* Returns an array with the names of the RFC 8879 certificate compression
|
|
1140
|
+
* algorithms supported by the current OpenSSL build, suitable for use in the
|
|
1141
|
+
* `certificateCompression` option of `tls.createSecureContext()`. Possible
|
|
1142
|
+
* values include `'zlib'`, `'brotli'`, and `'zstd'`.
|
|
1143
|
+
*
|
|
1144
|
+
* The array is empty when certificate compression is unavailable.
|
|
1145
|
+
*
|
|
1146
|
+
* ```js
|
|
1147
|
+
* console.log(tls.getCertificateCompressionAlgorithms()); // ['zlib', 'brotli', 'zstd']
|
|
1148
|
+
* ```
|
|
1149
|
+
* @since v26.4.0
|
|
1150
|
+
*/
|
|
1151
|
+
function getCertificateCompressionAlgorithms(): CertificateCompressionAlgorithm[];
|
|
1239
1152
|
/**
|
|
1240
1153
|
* Sets the default CA certificates used by Node.js TLS clients. If the provided
|
|
1241
1154
|
* certificates are parsed successfully, they will become the default CA
|
|
@@ -1264,14 +1177,14 @@ declare module "tls" {
|
|
|
1264
1177
|
* const additionalCerts = ['-----BEGIN CERTIFICATE-----\n...'];
|
|
1265
1178
|
* tls.setDefaultCACertificates([...currentCerts, ...additionalCerts]);
|
|
1266
1179
|
* ```
|
|
1267
|
-
* @since
|
|
1180
|
+
* @since v24.5.0
|
|
1268
1181
|
* @param certs An array of CA certificates in PEM format.
|
|
1269
1182
|
*/
|
|
1270
1183
|
function setDefaultCACertificates(certs: ReadonlyArray<string | NodeJS.ArrayBufferView>): void;
|
|
1271
1184
|
/**
|
|
1272
|
-
* The default curve
|
|
1273
|
-
* The default value is `'auto'`. See `
|
|
1274
|
-
* information.
|
|
1185
|
+
* The default named curve or TLS group list to use for key agreement in a TLS
|
|
1186
|
+
* server. The default value is `'auto'`. See `tls.createSecureContext()` for
|
|
1187
|
+
* further information.
|
|
1275
1188
|
* @since v0.11.13
|
|
1276
1189
|
*/
|
|
1277
1190
|
let DEFAULT_ECDH_CURVE: string;
|
|
@@ -1301,7 +1214,7 @@ declare module "tls" {
|
|
|
1301
1214
|
* It can be assigned any of the supported OpenSSL ciphers.
|
|
1302
1215
|
* Defaults to the content of `crypto.constants.defaultCoreCipherList`, unless
|
|
1303
1216
|
* changed using CLI options using `--tls-default-ciphers`.
|
|
1304
|
-
* @since
|
|
1217
|
+
* @since v19.8.0
|
|
1305
1218
|
*/
|
|
1306
1219
|
let DEFAULT_CIPHERS: string;
|
|
1307
1220
|
/**
|
|
@@ -1314,6 +1227,6 @@ declare module "tls" {
|
|
|
1314
1227
|
*/
|
|
1315
1228
|
const rootCertificates: readonly string[];
|
|
1316
1229
|
}
|
|
1317
|
-
declare module "
|
|
1318
|
-
export * from "tls";
|
|
1230
|
+
declare module "tls" {
|
|
1231
|
+
export * from "node:tls";
|
|
1319
1232
|
}
|