Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support additional tls.connect() options #1996

Merged
merged 5 commits into from Nov 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions lib/connection.js
Expand Up @@ -102,7 +102,20 @@ Connection.prototype.connect = function (port, host) {
key: self.ssl.key,
passphrase: self.ssl.passphrase,
cert: self.ssl.cert,
ciphers: self.ssl.ciphers,
sigalgs: self.ssl.sigalgs,
clientCertEngine: self.ssl.clientCertEngine,
crl: self.ssl.crl,
dhparam: self.ssl.dhparam,
ecdhCurve: self.ssl.ecdhCurve,
honorCipherOrder: self.ssl.honorCipherOrder,
privateKeyEngine: self.ssl.privateKeyEngine,
privateKeyIdentifier: self.ssl.privateKeyIdentifier,
maxVersion: self.ssl.maxVersion,
minVersion: self.ssl.minVersion,
minDHSize: self.ssl.minDHSize,
secureOptions: self.ssl.secureOptions,
ALPNProtocols: self.ssl.ALPNProtocols,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if we just did

tls.connect(Object.assign({
  // all the non-ssl options here
}, self.ssl))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me! I'll push an update shortly

NPNProtocols: self.ssl.NPNProtocols
})
self.attachListeners(self.stream)
Expand Down