@@ -752,6 +752,10 @@ decrease overall server throughput.
752
752
<!-- YAML
753
753
added: v0.11.3
754
754
changes:
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.
755
759
- version: v5.3.0, v4.7.0
756
760
pr-url: https://github.com/nodejs/node/pull/4246
757
761
description: The `secureContext` option is supported now.
@@ -776,16 +780,18 @@ changes:
776
780
against the list of supplied CAs. An ` 'error' ` event is emitted if
777
781
verification fails; ` err.code ` contains the OpenSSL error code. Defaults to
778
782
` 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'] ` .
789
795
* ` servername ` : {string} Server name for the SNI (Server Name Indication) TLS
790
796
extension.
791
797
* ` checkServerIdentity(servername, cert) ` {Function} A callback function
@@ -1002,6 +1008,10 @@ publicly trusted list of CAs as given in
1002
1008
<!-- YAML
1003
1009
added: v0.3.2
1004
1010
changes:
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.
1005
1015
- version: v5.0.0
1006
1016
pr-url: https://github.com/nodejs/node/pull/2564
1007
1017
description: ALPN options are supported now.
@@ -1018,10 +1028,20 @@ changes:
1018
1028
* ` rejectUnauthorized ` {boolean} If not ` false ` the server will reject any
1019
1029
connection which is not authorized with the list of supplied CAs. This
1020
1030
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.)
1025
1045
When the server receives both NPN and ALPN extensions from the client,
1026
1046
ALPN takes precedence over NPN and the server does not send an NPN
1027
1047
extension to the client.
0 commit comments