aboutsummaryrefslogtreecommitdiff
path: root/lib/_tls_wrap.js
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2015-12-11 15:47:39 -0500
committerFedor Indutny <fedor@indutny.com>2015-12-11 19:53:30 -0500
commitc5b4f6bc996e25f9e24db8ed31df86010d2dfcec (patch)
treeebd28b149c66237d1cea7ad66594e5fafae6eee9 /lib/_tls_wrap.js
parent425a3545d26bdc0b17115bc84101191c59b0553f (diff)
downloadandroid-node-v8-c5b4f6bc996e25f9e24db8ed31df86010d2dfcec.tar.gz
android-node-v8-c5b4f6bc996e25f9e24db8ed31df86010d2dfcec.tar.bz2
android-node-v8-c5b4f6bc996e25f9e24db8ed31df86010d2dfcec.zip
tls: introduce `secureContext` for `tls.connect`
Add `secureContext` option to `tls.connect`. It is useful for caching client certificates, key, and CA certificates. PR-URL: https://github.com/nodejs/node/pull/4246 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/_tls_wrap.js')
-rw-r--r--lib/_tls_wrap.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js
index ef5769ce65..3d0c6a74c2 100644
--- a/lib/_tls_wrap.js
+++ b/lib/_tls_wrap.js
@@ -984,7 +984,7 @@ exports.connect = function(/* [port, host], options, cb */) {
'localhost',
NPN = {},
ALPN = {},
- context = tls.createSecureContext(options);
+ context = options.secureContext || tls.createSecureContext(options);
tls.convertNPNProtocols(options.NPNProtocols, NPN);
tls.convertALPNProtocols(options.ALPNProtocols, ALPN);