diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-12-23 09:01:58 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-12-27 19:45:15 +0100 |
commit | 46510f54bee7cecb565424aeee8beb19b0162079 (patch) | |
tree | 8c039cf5649c14bb0c2b7e3449c5f54f39cd32a8 /lib | |
parent | 9e5ccf0313b7167d710e50c511db17ecfcdf416f (diff) | |
download | android-node-v8-46510f54bee7cecb565424aeee8beb19b0162079.tar.gz android-node-v8-46510f54bee7cecb565424aeee8beb19b0162079.tar.bz2 android-node-v8-46510f54bee7cecb565424aeee8beb19b0162079.zip |
tls: fix SNICallback without .server option
`options.server` only needs to be set when its
contents are actually being inspected.
PR-URL: https://github.com/nodejs/node/pull/17835
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/_tls_wrap.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 07d7cb7298..32fd1f322e 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -505,9 +505,8 @@ TLSSocket.prototype._init = function(socket, wrap) { if (process.features.tls_sni && options.isServer && options.SNICallback && - options.server && (options.SNICallback !== SNICallback || - options.server._contexts.length)) { + (options.server && options.server._contexts.length))) { assert(typeof options.SNICallback === 'function'); this._SNICallback = options.SNICallback; ssl.enableCertCb(); |