diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2018-03-17 05:13:47 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2018-03-27 16:22:37 +0200 |
commit | 5bfbe5ceaecb6412b176db446caf00f77f84bae7 (patch) | |
tree | 4c3a6696de1c1116046144473cac5e1389564790 /lib/_tls_wrap.js | |
parent | b3f23910a25613eb289fe4b338f83783a9f731b3 (diff) | |
download | android-node-v8-5bfbe5ceaecb6412b176db446caf00f77f84bae7.tar.gz android-node-v8-5bfbe5ceaecb6412b176db446caf00f77f84bae7.tar.bz2 android-node-v8-5bfbe5ceaecb6412b176db446caf00f77f84bae7.zip |
tls: drop NPN (next protocol negotiation) support
NPN has been superseded by ALPN. Chrome and Firefox removed support for
NPN in 2016 and 2017 respectively to no ill effect.
Fixes: https://github.com/nodejs/node/issues/14602
PR-URL: https://github.com/nodejs/node/pull/19403
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'lib/_tls_wrap.js')
-rw-r--r-- | lib/_tls_wrap.js | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 686e109ca3..2e6b2e8da5 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -294,8 +294,6 @@ function initRead(tls, wrapped) { function TLSSocket(socket, opts) { const tlsOptions = Object.assign({}, opts); - if (tlsOptions.NPNProtocols) - tls.convertNPNProtocols(tlsOptions.NPNProtocols, tlsOptions); if (tlsOptions.ALPNProtocols) tls.convertALPNProtocols(tlsOptions.ALPNProtocols, tlsOptions); @@ -306,7 +304,6 @@ function TLSSocket(socket, opts) { this._controlReleased = false; this._SNICallback = null; this.servername = null; - this.npnProtocol = null; this.alpnProtocol = null; this.authorized = false; this.authorizationError = null; @@ -529,9 +526,6 @@ TLSSocket.prototype._init = function(socket, wrap) { ssl.enableCertCb(); } - if (process.features.tls_npn && options.NPNProtocols) - ssl.setNPNProtocols(options.NPNProtocols); - if (process.features.tls_alpn && options.ALPNProtocols) { // keep reference in secureContext not to be GC-ed ssl._secureContext.alpnBuffer = options.ALPNProtocols; @@ -630,10 +624,6 @@ TLSSocket.prototype._releaseControl = function() { }; TLSSocket.prototype._finishInit = function() { - if (process.features.tls_npn) { - this.npnProtocol = this._handle.getNegotiatedProtocol(); - } - if (process.features.tls_alpn) { this.alpnProtocol = this._handle.getALPNNegotiatedProtocol(); } @@ -790,7 +780,6 @@ function tlsConnectionListener(rawSocket) { requestCert: this.requestCert, rejectUnauthorized: this.rejectUnauthorized, handshakeTimeout: this[kHandshakeTimeout], - NPNProtocols: this.NPNProtocols, ALPNProtocols: this.ALPNProtocols, SNICallback: this[kSNICallback] || SNICallback }); @@ -982,7 +971,6 @@ Server.prototype.setOptions = function(options) { else this.honorCipherOrder = true; if (secureOptions) this.secureOptions = secureOptions; - if (options.NPNProtocols) tls.convertNPNProtocols(options.NPNProtocols, this); if (options.ALPNProtocols) tls.convertALPNProtocols(options.ALPNProtocols, this); if (options.sessionIdContext) { @@ -1149,7 +1137,6 @@ exports.connect = function(...args /* [port,] [host,] [options,] [cb] */) { requestCert: true, rejectUnauthorized: options.rejectUnauthorized !== false, session: options.session, - NPNProtocols: options.NPNProtocols, ALPNProtocols: options.ALPNProtocols, requestOCSP: options.requestOCSP }); |