@@ -752,6 +752,10 @@ decrease overall server throughput.
752752<!-- YAML
753753added: v0.11.3
754754changes:
755+ - version: REPLACEME
756+ pr-url: https://github.com/nodejs/node/pull/11984
757+ description: The `ALPNProtocols` and `NPNProtocols` options can
758+ be `Uint8Array`s now.
755759 - version: v5.3.0, v4.7.0
756760 pr-url: https://github.com/nodejs/node/pull/4246
757761 description: The `secureContext` option is supported now.
@@ -776,16 +780,18 @@ changes:
776780 against the list of supplied CAs. An ` 'error' ` event is emitted if
777781 verification fails; ` err.code ` contains the OpenSSL error code. Defaults to
778782 ` true ` .
779- * ` NPNProtocols ` {string[ ] |Buffer[ ] } An array of strings or ` Buffer ` s
780- containing supported NPN protocols. ` Buffer ` s should have the format
781- ` [len][name][len][name]... ` e.g. ` 0x05hello0x05world ` , where the first
782- byte is the length of the next protocol name. Passing an array is usually
783- much simpler, e.g. ` ['hello', 'world'] ` .
784- * ` ALPNProtocols ` : {string[ ] |Buffer[ ] } An array of strings or ` Buffer ` s
785- containing the supported ALPN protocols. ` Buffer ` s should have the format
786- ` [len][name][len][name]... ` e.g. ` 0x05hello0x05world ` , where the first byte
787- is the length of the next protocol name. Passing an array is usually much
788- simpler: ` ['hello', 'world'] ` .)
783+ * ` NPNProtocols ` {string[ ] |Buffer[ ] |Uint8Array[ ] |Buffer|Uint8Array}
784+ An array of strings, Buffer` s or ` Uint8Array` s, or a single ` Buffer` or
785+ ` Uint8Array ` containing supported NPN protocols. ` Buffer ` s should have the
786+ format ` [len][name][len][name]... ` e.g. ` 0x05hello0x05world ` , where the
787+ first byte is the length of the next protocol name. Passing an array is
788+ usually much simpler, e.g. ` ['hello', 'world'] ` .
789+ * ` ALPNProtocols ` : {string[ ] |Buffer[ ] |Uint8Array[ ] |Buffer|Uint8Array}
790+ An array of strings, ` Buffer ` s or ` Uint8Array ` s, or a single ` Buffer ` or
791+ ` Uint8Array ` containing the supported ALPN protocols. ` Buffer ` s should have
792+ the format ` [len][name][len][name]... ` e.g. ` 0x05hello0x05world ` , where the
793+ first byte is the length of the next protocol name. Passing an array is
794+ usually much simpler, e.g. ` ['hello', 'world'] ` .
789795 * ` servername ` : {string} Server name for the SNI (Server Name Indication) TLS
790796 extension.
791797 * ` checkServerIdentity(servername, cert) ` {Function} A callback function
@@ -1002,6 +1008,10 @@ publicly trusted list of CAs as given in
10021008<!-- YAML
10031009added: v0.3.2
10041010changes:
1011+ - version: REPLACEME
1012+ pr-url: https://github.com/nodejs/node/pull/11984
1013+ description: The `ALPNProtocols` and `NPNProtocols` options can
1014+ be `Uint8Array`s now.
10051015 - version: v5.0.0
10061016 pr-url: https://github.com/nodejs/node/pull/2564
10071017 description: ALPN options are supported now.
@@ -1018,10 +1028,20 @@ changes:
10181028 * ` rejectUnauthorized ` {boolean} If not ` false ` the server will reject any
10191029 connection which is not authorized with the list of supplied CAs. This
10201030 option only has an effect if ` requestCert ` is ` true ` . Defaults to ` true ` .
1021- * ` NPNProtocols ` {string[ ] |Buffer} An array of strings or a ` Buffer ` naming
1022- possible NPN protocols. (Protocols should be ordered by their priority.)
1023- * ` ALPNProtocols ` {string[ ] |Buffer} An array of strings or a ` Buffer ` naming
1024- possible ALPN protocols. (Protocols should be ordered by their priority.)
1031+ * ` NPNProtocols ` {string[ ] |Buffer[ ] |Uint8Array[ ] |Buffer|Uint8Array}
1032+ An array of strings, Buffer` s or ` Uint8Array` s, or a single ` Buffer` or
1033+ ` Uint8Array ` containing supported NPN protocols. ` Buffer ` s should have the
1034+ format ` [len][name][len][name]... ` e.g. ` 0x05hello0x05world ` , where the
1035+ first byte is the length of the next protocol name. Passing an array is
1036+ usually much simpler, e.g. ` ['hello', 'world'] ` .
1037+ (Protocols should be ordered by their priority.)
1038+ * ` ALPNProtocols ` : {string[ ] |Buffer[ ] |Uint8Array[ ] |Buffer|Uint8Array}
1039+ An array of strings, ` Buffer ` s or ` Uint8Array ` s, or a single ` Buffer ` or
1040+ ` Uint8Array ` containing the supported ALPN protocols. ` Buffer ` s should have
1041+ the format ` [len][name][len][name]... ` e.g. ` 0x05hello0x05world ` , where the
1042+ first byte is the length of the next protocol name. Passing an array is
1043+ usually much simpler, e.g. ` ['hello', 'world'] ` .
1044+ (Protocols should be ordered by their priority.)
10251045 When the server receives both NPN and ALPN extensions from the client,
10261046 ALPN takes precedence over NPN and the server does not send an NPN
10271047 extension to the client.
0 commit comments