diff --git a/lib/WebSocket.js b/lib/WebSocket.js index 82d335458..ce1831287 100644 --- a/lib/WebSocket.js +++ b/lib/WebSocket.js @@ -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 @@ -498,6 +499,7 @@ function initAsClient (address, protocols, options) { rejectUnauthorized: null, passphrase: null, ciphers: null, + ecdhCurve: null, cert: null, key: null, pfx: null, @@ -598,6 +600,7 @@ function initAsClient (address, protocols, options) { options.checkServerIdentity || options.passphrase || options.ciphers || + options.ecdhCurve || options.cert || options.key || options.pfx || @@ -605,6 +608,7 @@ function initAsClient (address, protocols, options) { ) { 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;