summaryrefslogtreecommitdiff
path: root/lib/_tls_wrap.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2018-06-02 10:52:59 +0200
committerAnna Henningsen <anna@addaleax.net>2018-06-08 00:53:37 +0200
commita76f0298184115971bac56dd369418786569f76d (patch)
treea337f105fb3c0cd36e53098d4badbadab2bbde49 /lib/_tls_wrap.js
parentefdc1a44bb540375110720882f3f978cf20b1259 (diff)
downloadandroid-node-v8-a76f0298184115971bac56dd369418786569f76d.tar.gz
android-node-v8-a76f0298184115971bac56dd369418786569f76d.tar.bz2
android-node-v8-a76f0298184115971bac56dd369418786569f76d.zip
lib,src: remove openssl feature conditionals
Remove compile-time and run-time conditionals for features that OpenSSL 1.0.0 and 1.0.1 didn't support: ALPN, OCSP and/or SNI. They are no longer necessary since our baseline is OpenSSL 1.0.2. PR-URL: https://github.com/nodejs/node/pull/21094 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'lib/_tls_wrap.js')
-rw-r--r--lib/_tls_wrap.js15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js
index 77b37c54f0..7b16abab87 100644
--- a/lib/_tls_wrap.js
+++ b/lib/_tls_wrap.js
@@ -512,8 +512,7 @@ TLSSocket.prototype._init = function(socket, wrap) {
// If custom SNICallback was given, or if
// there're SNI contexts to perform match against -
// set `.onsniselect` callback.
- if (process.features.tls_sni &&
- options.isServer &&
+ if (options.isServer &&
options.SNICallback &&
(options.SNICallback !== SNICallback ||
(options.server && options.server._contexts.length))) {
@@ -522,7 +521,7 @@ TLSSocket.prototype._init = function(socket, wrap) {
ssl.enableCertCb();
}
- if (process.features.tls_alpn && options.ALPNProtocols) {
+ if (options.ALPNProtocols) {
// keep reference in secureContext not to be GC-ed
ssl._secureContext.alpnBuffer = options.ALPNProtocols;
ssl.setALPNProtocols(ssl._secureContext.alpnBuffer);
@@ -620,15 +619,9 @@ TLSSocket.prototype._releaseControl = function() {
};
TLSSocket.prototype._finishInit = function() {
- if (process.features.tls_alpn) {
- this.alpnProtocol = this._handle.getALPNNegotiatedProtocol();
- }
-
- if (process.features.tls_sni) {
- this.servername = this._handle.getServername();
- }
-
debug('secure established');
+ this.alpnProtocol = this._handle.getALPNNegotiatedProtocol();
+ this.servername = this._handle.getServername();
this._secureEstablished = true;
if (this._tlsOptions.handshakeTimeout > 0)
this.setTimeout(0, this._handleTimeout);