@@ -104,22 +104,17 @@ not required and a default ECDHE curve will be used. The `ecdhCurve` property
104104can be used when creating a TLS Server to specify the list of names of supported
105105curves to use, see [ ` tls.createServer() ` ] for more info.
106106
107- ### ALPN, NPN, and SNI
107+ ### ALPN and SNI
108108
109109<!-- type=misc -->
110110
111- ALPN (Application-Layer Protocol Negotiation Extension), NPN (Next
112- Protocol Negotiation) and, SNI (Server Name Indication) are TLS
113- handshake extensions:
111+ ALPN (Application-Layer Protocol Negotiation Extension) and
112+ SNI (Server Name Indication) are TLS handshake extensions:
114113
115- * ALPN/NPN - Allows the use of one TLS server for multiple protocols (HTTP,
116- SPDY, HTTP/2)
114+ * ALPN - Allows the use of one TLS server for multiple protocols (HTTP, HTTP/2)
117115* SNI - Allows the use of one TLS server for multiple hostnames with different
118116 SSL certificates.
119117
120- Use of ALPN is recommended over NPN. The NPN extension has never been
121- formally defined or documented and generally not recommended for use.
122-
123118### Client-initiated renegotiation attack mitigation
124119
125120<!-- type=misc -->
@@ -332,12 +327,9 @@ server. If `tlsSocket.authorized` is `false`, then `socket.authorizationError`
332327is set to describe how authorization failed. Note that depending on the settings
333328of the TLS server, unauthorized connections may still be accepted.
334329
335- The ` tlsSocket.npnProtocol ` and ` tlsSocket.alpnProtocol ` properties are strings
336- that contain the selected NPN and ALPN protocols, respectively. When both NPN
337- and ALPN extensions are received, ALPN takes precedence over NPN and the next
338- protocol is selected by ALPN.
339-
340- When ALPN has no selected protocol, ` tlsSocket.alpnProtocol ` returns ` false ` .
330+ The ` tlsSocket.alpnProtocol ` property is a string that contains the selected
331+ ALPN protocol. When ALPN has no selected protocol, ` tlsSocket.alpnProtocol `
332+ equals ` false ` .
341333
342334The ` tlsSocket.servername ` property is a string containing the server name
343335requested via SNI.
@@ -468,7 +460,6 @@ changes:
468460 (` isServer ` is true) may optionally set ` requestCert ` to true to request a
469461 client certificate.
470462 * ` rejectUnauthorized ` : Optional, see [ ` tls.createServer() ` ] [ ]
471- * ` NPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
472463 * ` ALPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
473464 * ` SNICallback ` : Optional, see [ ` tls.createServer() ` ] [ ]
474465 * ` session ` {Buffer} An optional ` Buffer ` instance containing a TLS session.
@@ -509,9 +500,9 @@ regardless of whether or not the server's certificate has been authorized. It
509500is the client's responsibility to check the ` tlsSocket.authorized ` property to
510501determine if the server certificate was signed by one of the specified CAs. If
511502` tlsSocket.authorized === false ` , then the error can be found by examining the
512- ` tlsSocket.authorizationError ` property. If either ALPN or NPN was used,
513- the ` tlsSocket.alpnProtocol ` or ` tlsSocket.npnProtocol ` properties can be
514- checked to determine the negotiated protocol.
503+ ` tlsSocket.authorizationError ` property. If ALPN was used, the
504+ ` tlsSocket.alpnProtocol ` property can be checked to determine the negotiated
505+ protocol.
515506
516507### tlsSocket.address()
517508<!-- YAML
@@ -841,8 +832,7 @@ changes:
841832 description: The `lookup` option is supported now.
842833 - version: v8.0.0
843834 pr-url: https://github.com/nodejs/node/pull/11984
844- description: The `ALPNProtocols` and `NPNProtocols` options can
845- be `Uint8Array`s now.
835+ description: The `ALPNProtocols` option can be a `Uint8Array` now.
846836 - version: v5.3.0, v4.7.0
847837 pr-url: https://github.com/nodejs/node/pull/4246
848838 description: The `secureContext` option is supported now.
@@ -869,12 +859,6 @@ changes:
869859 verified against the list of supplied CAs. An ` 'error' ` event is emitted if
870860 verification fails; ` err.code ` contains the OpenSSL error code. Defaults to
871861 ` true ` .
872- * ` NPNProtocols ` {string[ ] |Buffer[ ] |Uint8Array[ ] |Buffer|Uint8Array}
873- An array of strings, ` Buffer ` s or ` Uint8Array ` s, or a single ` Buffer ` or
874- ` Uint8Array ` containing supported NPN protocols. ` Buffer ` s should have the
875- format ` [len][name][len][name]... ` e.g. ` 0x05hello0x05world ` , where the
876- first byte is the length of the next protocol name. Passing an array is
877- usually much simpler, e.g. ` ['hello', 'world'] ` .
878862 * ` ALPNProtocols ` : {string[ ] |Buffer[ ] |Uint8Array[ ] |Buffer|Uint8Array}
879863 An array of strings, ` Buffer ` s or ` Uint8Array ` s, or a single ` Buffer ` or
880864 ` Uint8Array ` containing the supported ALPN protocols. ` Buffer ` s should have
@@ -1116,8 +1100,7 @@ changes:
11161100 description: The `options` parameter can now include `clientCertEngine`.
11171101 - version: v8.0.0
11181102 pr-url: https://github.com/nodejs/node/pull/11984
1119- description: The `ALPNProtocols` and `NPNProtocols` options can
1120- be `Uint8Array`s now.
1103+ description: The `ALPNProtocols` option can be a `Uint8Array` now.
11211104 - version: v5.0.0
11221105 pr-url: https://github.com/nodejs/node/pull/2564
11231106 description: ALPN options are supported now.
@@ -1136,23 +1119,13 @@ changes:
11361119 * ` rejectUnauthorized ` {boolean} If not ` false ` the server will reject any
11371120 connection which is not authorized with the list of supplied CAs. This
11381121 option only has an effect if ` requestCert ` is ` true ` . Defaults to ` true ` .
1139- * ` NPNProtocols ` {string[ ] |Buffer[ ] |Uint8Array[ ] |Buffer|Uint8Array}
1140- An array of strings, ` Buffer ` s or ` Uint8Array ` s, or a single ` Buffer ` or
1141- ` Uint8Array ` containing supported NPN protocols. ` Buffer ` s should have the
1142- format ` [len][name][len][name]... ` e.g. ` 0x05hello0x05world ` , where the
1143- first byte is the length of the next protocol name. Passing an array is
1144- usually much simpler, e.g. ` ['hello', 'world'] ` .
1145- (Protocols should be ordered by their priority.)
11461122 * ` ALPNProtocols ` : {string[ ] |Buffer[ ] |Uint8Array[ ] |Buffer|Uint8Array}
11471123 An array of strings, ` Buffer ` s or ` Uint8Array ` s, or a single ` Buffer ` or
11481124 ` Uint8Array ` containing the supported ALPN protocols. ` Buffer ` s should have
11491125 the format ` [len][name][len][name]... ` e.g. ` 0x05hello0x05world ` , where the
11501126 first byte is the length of the next protocol name. Passing an array is
11511127 usually much simpler, e.g. ` ['hello', 'world'] ` .
11521128 (Protocols should be ordered by their priority.)
1153- When the server receives both NPN and ALPN extensions from the client,
1154- ALPN takes precedence over NPN and the server does not send an NPN
1155- extension to the client.
11561129 * ` SNICallback(servername, cb) ` {Function} A function that will be called if
11571130 the client supports SNI TLS extension. Two arguments will be passed when
11581131 called: ` servername ` and ` cb ` . ` SNICallback ` should invoke ` cb(null, ctx) ` ,
@@ -1333,7 +1306,6 @@ changes:
13331306 * ` server ` {net.Server} An optional [ ` net.Server ` ] [ ] instance
13341307 * ` requestCert ` : Optional, see [ ` tls.createServer() ` ] [ ]
13351308 * ` rejectUnauthorized ` : Optional, see [ ` tls.createServer() ` ] [ ]
1336- * ` NPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
13371309 * ` ALPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
13381310 * ` SNICallback ` : Optional, see [ ` tls.createServer() ` ] [ ]
13391311 * ` session ` {Buffer} An optional ` Buffer ` instance containing a TLS session.
0 commit comments