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

Add ecdhCurve option #1228

Merged
merged 1 commit into from Nov 1, 2017
Merged
Changes from all commits
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
4 changes: 4 additions & 0 deletions lib/WebSocket.js
Expand Up @@ -472,6 +472,7 @@ function initAsServerClient (socket, head, options) {
* @param {Boolean} options.rejectUnauthorized Verify or not the server certificate
* @param {String} options.passphrase The passphrase for the private key or pfx
* @param {String} options.ciphers The ciphers to use or exclude
* @param {String} options.ecdhCurve The curves for ECDH key agreement to use or exclude
* @param {(String|String[]|Buffer|Buffer[])} options.cert The certificate key
* @param {(String|String[]|Buffer|Buffer[])} options.key The private key
* @param {(String|Buffer)} options.pfx The private key, certificate, and CA certs
Expand All @@ -498,6 +499,7 @@ function initAsClient (address, protocols, options) {
rejectUnauthorized: null,
passphrase: null,
ciphers: null,
ecdhCurve: null,
cert: null,
key: null,
pfx: null,
Expand Down Expand Up @@ -598,13 +600,15 @@ function initAsClient (address, protocols, options) {
options.checkServerIdentity ||
options.passphrase ||
options.ciphers ||
options.ecdhCurve ||
options.cert ||
options.key ||
options.pfx ||
options.ca
) {
if (options.passphrase) requestOptions.passphrase = options.passphrase;
if (options.ciphers) requestOptions.ciphers = options.ciphers;
if (options.ecdhCurve) requestOptions.ecdhCurve = options.ecdhCurve;
if (options.cert) requestOptions.cert = options.cert;
if (options.key) requestOptions.key = options.key;
if (options.pfx) requestOptions.pfx = options.pfx;
Expand Down