@@ -104,22 +104,17 @@ not required and a default ECDHE curve will be used. The `ecdhCurve` property
104
104
can be used when creating a TLS Server to specify the list of names of supported
105
105
curves to use, see [ ` tls.createServer() ` ] for more info.
106
106
107
- ### ALPN, NPN, and SNI
107
+ ### ALPN and SNI
108
108
109
109
<!-- type=misc -->
110
110
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:
114
113
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)
117
115
* SNI - Allows the use of one TLS server for multiple hostnames with different
118
116
SSL certificates.
119
117
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
-
123
118
### Client-initiated renegotiation attack mitigation
124
119
125
120
<!-- type=misc -->
@@ -332,12 +327,9 @@ server. If `tlsSocket.authorized` is `false`, then `socket.authorizationError`
332
327
is set to describe how authorization failed. Note that depending on the settings
333
328
of the TLS server, unauthorized connections may still be accepted.
334
329
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 ` .
341
333
342
334
The ` tlsSocket.servername ` property is a string containing the server name
343
335
requested via SNI.
@@ -468,7 +460,6 @@ changes:
468
460
(` isServer ` is true) may optionally set ` requestCert ` to true to request a
469
461
client certificate.
470
462
* ` rejectUnauthorized ` : Optional, see [ ` tls.createServer() ` ] [ ]
471
- * ` NPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
472
463
* ` ALPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
473
464
* ` SNICallback ` : Optional, see [ ` tls.createServer() ` ] [ ]
474
465
* ` 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
509
500
is the client's responsibility to check the ` tlsSocket.authorized ` property to
510
501
determine if the server certificate was signed by one of the specified CAs. If
511
502
` 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.
515
506
516
507
### tlsSocket.address()
517
508
<!-- YAML
@@ -841,8 +832,7 @@ changes:
841
832
description: The `lookup` option is supported now.
842
833
- version: v8.0.0
843
834
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.
846
836
- version: v5.3.0, v4.7.0
847
837
pr-url: https://github.com/nodejs/node/pull/4246
848
838
description: The `secureContext` option is supported now.
@@ -869,12 +859,6 @@ changes:
869
859
verified against the list of supplied CAs. An ` 'error' ` event is emitted if
870
860
verification fails; ` err.code ` contains the OpenSSL error code. Defaults to
871
861
` 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'] ` .
878
862
* ` ALPNProtocols ` : {string[ ] |Buffer[ ] |Uint8Array[ ] |Buffer|Uint8Array}
879
863
An array of strings, ` Buffer ` s or ` Uint8Array ` s, or a single ` Buffer ` or
880
864
` Uint8Array ` containing the supported ALPN protocols. ` Buffer ` s should have
@@ -1116,8 +1100,7 @@ changes:
1116
1100
description: The `options` parameter can now include `clientCertEngine`.
1117
1101
- version: v8.0.0
1118
1102
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.
1121
1104
- version: v5.0.0
1122
1105
pr-url: https://github.com/nodejs/node/pull/2564
1123
1106
description: ALPN options are supported now.
@@ -1136,23 +1119,13 @@ changes:
1136
1119
* ` rejectUnauthorized ` {boolean} If not ` false ` the server will reject any
1137
1120
connection which is not authorized with the list of supplied CAs. This
1138
1121
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.)
1146
1122
* ` ALPNProtocols ` : {string[ ] |Buffer[ ] |Uint8Array[ ] |Buffer|Uint8Array}
1147
1123
An array of strings, ` Buffer ` s or ` Uint8Array ` s, or a single ` Buffer ` or
1148
1124
` Uint8Array ` containing the supported ALPN protocols. ` Buffer ` s should have
1149
1125
the format ` [len][name][len][name]... ` e.g. ` 0x05hello0x05world ` , where the
1150
1126
first byte is the length of the next protocol name. Passing an array is
1151
1127
usually much simpler, e.g. ` ['hello', 'world'] ` .
1152
1128
(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.
1156
1129
* ` SNICallback(servername, cb) ` {Function} A function that will be called if
1157
1130
the client supports SNI TLS extension. Two arguments will be passed when
1158
1131
called: ` servername ` and ` cb ` . ` SNICallback ` should invoke ` cb(null, ctx) ` ,
@@ -1333,7 +1306,6 @@ changes:
1333
1306
* ` server ` {net.Server} An optional [ ` net.Server ` ] [ ] instance
1334
1307
* ` requestCert ` : Optional, see [ ` tls.createServer() ` ] [ ]
1335
1308
* ` rejectUnauthorized ` : Optional, see [ ` tls.createServer() ` ] [ ]
1336
- * ` NPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
1337
1309
* ` ALPNProtocols ` : Optional, see [ ` tls.createServer() ` ] [ ]
1338
1310
* ` SNICallback ` : Optional, see [ ` tls.createServer() ` ] [ ]
1339
1311
* ` session ` {Buffer} An optional ` Buffer ` instance containing a TLS session.
0 commit comments