diff options
author | Beni von Cheni <benjaminlchen@gmail.com> | 2018-10-01 22:52:30 -0400 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-10-08 08:29:33 +0200 |
commit | f5ab9d1765dab78516b16da4ca9ef670c7022328 (patch) | |
tree | e1644bd5fa78c5c6e8168529af162d764f487643 /doc/api/tls.md | |
parent | 1c75ec2c7eea6e1c667edd3268f0970dc1547e68 (diff) | |
download | android-node-v8-f5ab9d1765dab78516b16da4ca9ef670c7022328.tar.gz android-node-v8-f5ab9d1765dab78516b16da4ca9ef670c7022328.tar.bz2 android-node-v8-f5ab9d1765dab78516b16da4ca9ef670c7022328.zip |
tls: update test & docs for ArrayBuffer/DataView
In tls module, accept ArrayBuffer/DataView in place of isUint8Array in
the source code & related test code in "test-tls-basic-validations.js",
per the "tls" item in the checklist of the comment in #1826.
PR-URL: https://github.com/nodejs/node/pull/23210
Refs: https://github.com/nodejs/node/issues/1826
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Diffstat (limited to 'doc/api/tls.md')
-rw-r--r-- | doc/api/tls.md | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/doc/api/tls.md b/doc/api/tls.md index 991c6e468f..0cba4653e7 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -856,7 +856,8 @@ changes: description: The `lookup` option is supported now. - version: v8.0.0 pr-url: https://github.com/nodejs/node/pull/11984 - description: The `ALPNProtocols` option can be a `Uint8Array` now. + description: The `ALPNProtocols` option can be a `TypedArray` or + `DataView` now. - version: v5.3.0, v4.7.0 pr-url: https://github.com/nodejs/node/pull/4246 description: The `secureContext` option is supported now. @@ -884,12 +885,14 @@ changes: verified against the list of supplied CAs. An `'error'` event is emitted if verification fails; `err.code` contains the OpenSSL error code. **Default:** `true`. - * `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']`. + * `ALPNProtocols`: {string[]|Buffer[]|TypedArray[]|DataView[]|Buffer| + TypedArray|DataView} + An array of strings, `Buffer`s or `TypedArray`s or `DataView`s, or a + single `Buffer` or `TypedArray` or `DataView` 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 @@ -1134,20 +1137,22 @@ changes: description: The `options` parameter can now include `clientCertEngine`. - version: v8.0.0 pr-url: https://github.com/nodejs/node/pull/11984 - description: The `ALPNProtocols` option can be a `Uint8Array` now. + description: The `ALPNProtocols` option can be a `TypedArray` or + `DataView` now. - version: v5.0.0 pr-url: https://github.com/nodejs/node/pull/2564 description: ALPN options are supported now. --> * `options` {Object} - * `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.) + * `ALPNProtocols`: {string[]|Buffer[]|TypedArray[]|DataView[]|Buffer| + TypedArray|DataView} + An array of strings, `Buffer`s or `TypedArray`s or `DataView`s, or a single + `Buffer` or `TypedArray` or `DataView` 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.) * `clientCertEngine` {string} Name of an OpenSSL engine which can provide the client certificate. * `handshakeTimeout` {number} Abort the connection if the SSL/TLS handshake |