Fix default ecdh curve for better compatibility

This commit is contained in:
Pavel Djundik 2018-03-06 15:11:42 +02:00
parent 4551c10a5c
commit 501730f2ca

View File

@ -11,6 +11,16 @@ const storage = require("../storage");
process.setMaxListeners(0); 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) { module.exports = function(client, chan, msg) {
if (!Helper.config.prefetch) { if (!Helper.config.prefetch) {
return; return;