Merge pull request #2159 from thelounge/xpaw/ecdh-auto-curves

Fix default ecdh curve for better compatibility
This commit is contained in:
Jérémie Astori 2018-03-06 19:53:11 -05:00 committed by GitHub
commit c3ed4ebc5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,6 +11,16 @@ const storage = require("../storage");
process.setMaxListeners(0);
// Fix ECDH curve client compatibility in Node v8/v9
// This is fixed in Node 10, but The Lounge supports LTS versions
// https://github.com/nodejs/node/issues/16196
// https://github.com/nodejs/node/pull/16853
const tls = require("tls");
if (tls.DEFAULT_ECDH_CURVE === "prime256v1") {
tls.DEFAULT_ECDH_CURVE = "auto";
}
module.exports = function(client, chan, msg) {
if (!Helper.config.prefetch) {
return;