diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-12-11 15:47:39 -0500 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2015-12-11 19:53:30 -0500 |
commit | c5b4f6bc996e25f9e24db8ed31df86010d2dfcec (patch) | |
tree | ebd28b149c66237d1cea7ad66594e5fafae6eee9 /lib | |
parent | 425a3545d26bdc0b17115bc84101191c59b0553f (diff) | |
download | node-new-c5b4f6bc996e25f9e24db8ed31df86010d2dfcec.tar.gz |
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')
-rw-r--r-- | lib/_tls_wrap.js | 2 |
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); |