summaryrefslogtreecommitdiff
path: root/doc/api/tls.md
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-03-22 07:42:04 +0100
committerAnna Henningsen <anna@addaleax.net>2017-03-27 02:08:49 +0200
commitc3efe726694907ce0b2e41546d84a9a94547383e (patch)
tree29c490bd046b4e29b9d1cd92d5d94df066800c9a /doc/api/tls.md
parent2dc1053b0a6800ab7baf052017d37eaebf5e5a7e (diff)
downloadandroid-node-v8-c3efe726694907ce0b2e41546d84a9a94547383e.tar.gz
android-node-v8-c3efe726694907ce0b2e41546d84a9a94547383e.tar.bz2
android-node-v8-c3efe726694907ce0b2e41546d84a9a94547383e.zip
tls: support Uint8Arrays for protocol list buffers
PR-URL: https://github.com/nodejs/node/pull/11984 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc/api/tls.md')
-rw-r--r--doc/api/tls.md48
1 files changed, 34 insertions, 14 deletions
diff --git a/doc/api/tls.md b/doc/api/tls.md
index 468a1b4eb8..1e8bff1d49 100644
--- a/doc/api/tls.md
+++ b/doc/api/tls.md
@@ -752,6 +752,10 @@ decrease overall server throughput.
<!-- YAML
added: v0.11.3
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/11984
+ description: The `ALPNProtocols` and `NPNProtocols` options can
+ be `Uint8Array`s now.
- version: v5.3.0, v4.7.0
pr-url: https://github.com/nodejs/node/pull/4246
description: The `secureContext` option is supported now.
@@ -776,16 +780,18 @@ changes:
against the list of supplied CAs. An `'error'` event is emitted if
verification fails; `err.code` contains the OpenSSL error code. Defaults to
`true`.
- * `NPNProtocols` {string[]|Buffer[]} An array of strings or `Buffer`s
- containing supported NPN protocols. `Buffer`s should have the format
- `[len][name][len][name]...` e.g. `0x05hello0x05world`, where the first
- byte is the length of the next protocol name. Passing an array is usually
- much simpler, e.g. `['hello', 'world']`.
- * `ALPNProtocols`: {string[]|Buffer[]} An array of strings or `Buffer`s
- containing the supported ALPN protocols. `Buffer`s should have the format
- `[len][name][len][name]...` e.g. `0x05hello0x05world`, where the first byte
- is the length of the next protocol name. Passing an array is usually much
- simpler: `['hello', 'world']`.)
+ * `NPNProtocols` {string[]|Buffer[]|Uint8Array[]|Buffer|Uint8Array}
+ An array of strings, Buffer`s or `Uint8Array`s, or a single `Buffer` or
+ `Uint8Array` containing supported NPN protocols. `Buffer`s should have the
+ format `[len][name][len][name]...` e.g. `0x05hello0x05world`, where the
+ first byte is the length of the next protocol name. Passing an array is
+ usually much simpler, e.g. `['hello', 'world']`.
+ * `ALPNProtocols`: {string[]|Buffer[]|Uint8Array[]|Buffer|Uint8Array}
+ An array of strings, `Buffer`s or `Uint8Array`s, or a single `Buffer` or
+ `Uint8Array` containing the supported ALPN protocols. `Buffer`s should have
+ the format `[len][name][len][name]...` e.g. `0x05hello0x05world`, where the
+ first byte is the length of the next protocol name. Passing an array is
+ usually much simpler, e.g. `['hello', 'world']`.
* `servername`: {string} Server name for the SNI (Server Name Indication) TLS
extension.
* `checkServerIdentity(servername, cert)` {Function} A callback function
@@ -1002,6 +1008,10 @@ publicly trusted list of CAs as given in
<!-- YAML
added: v0.3.2
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/11984
+ description: The `ALPNProtocols` and `NPNProtocols` options can
+ be `Uint8Array`s now.
- version: v5.0.0
pr-url: https://github.com/nodejs/node/pull/2564
description: ALPN options are supported now.
@@ -1018,10 +1028,20 @@ changes:
* `rejectUnauthorized` {boolean} If not `false` the server will reject any
connection which is not authorized with the list of supplied CAs. This
option only has an effect if `requestCert` is `true`. Defaults to `true`.
- * `NPNProtocols` {string[]|Buffer} An array of strings or a `Buffer` naming
- possible NPN protocols. (Protocols should be ordered by their priority.)
- * `ALPNProtocols` {string[]|Buffer} An array of strings or a `Buffer` naming
- possible ALPN protocols. (Protocols should be ordered by their priority.)
+ * `NPNProtocols` {string[]|Buffer[]|Uint8Array[]|Buffer|Uint8Array}
+ An array of strings, Buffer`s or `Uint8Array`s, or a single `Buffer` or
+ `Uint8Array` containing supported NPN protocols. `Buffer`s should have the
+ format `[len][name][len][name]...` e.g. `0x05hello0x05world`, where the
+ first byte is the length of the next protocol name. Passing an array is
+ usually much simpler, e.g. `['hello', 'world']`.
+ (Protocols should be ordered by their priority.)
+ * `ALPNProtocols`: {string[]|Buffer[]|Uint8Array[]|Buffer|Uint8Array}
+ An array of strings, `Buffer`s or `Uint8Array`s, or a single `Buffer` or
+ `Uint8Array` containing the supported ALPN protocols. `Buffer`s should have
+ the format `[len][name][len][name]...` e.g. `0x05hello0x05world`, where the
+ first byte is the length of the next protocol name. Passing an array is
+ usually much simpler, e.g. `['hello', 'world']`.
+ (Protocols should be ordered by their priority.)
When the server receives both NPN and ALPN extensions from the client,
ALPN takes precedence over NPN and the server does not send an NPN
extension to the client.