Allow minimum TLSv1.2 and recommended ciphers, fixes #105.
parent
aac2e5f918
commit
10228a9f8c
|
|
@ -6,6 +6,7 @@ const config = require('./config/config');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const http = require('http');
|
const http = require('http');
|
||||||
const spdy = require('spdy');
|
const spdy = require('spdy');
|
||||||
|
const { constants } = require('crypto');
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const bodyParser = require('body-parser');
|
const bodyParser = require('body-parser');
|
||||||
const cookieParser = require('cookie-parser');
|
const cookieParser = require('cookie-parser');
|
||||||
|
|
@ -55,7 +56,20 @@ const peers = new Map();
|
||||||
const tls =
|
const tls =
|
||||||
{
|
{
|
||||||
cert : fs.readFileSync(config.tls.cert),
|
cert : fs.readFileSync(config.tls.cert),
|
||||||
key : fs.readFileSync(config.tls.key)
|
key : fs.readFileSync(config.tls.key),
|
||||||
|
secureOptions : 'tlsv12',
|
||||||
|
ciphers :
|
||||||
|
[
|
||||||
|
'ECDHE-ECDSA-AES128-GCM-SHA256',
|
||||||
|
'ECDHE-RSA-AES128-GCM-SHA256',
|
||||||
|
'ECDHE-ECDSA-AES256-GCM-SHA384',
|
||||||
|
'ECDHE-RSA-AES256-GCM-SHA384',
|
||||||
|
'ECDHE-ECDSA-CHACHA20-POLY1305',
|
||||||
|
'ECDHE-RSA-CHACHA20-POLY1305',
|
||||||
|
'DHE-RSA-AES128-GCM-SHA256',
|
||||||
|
'DHE-RSA-AES256-GCM-SHA384'
|
||||||
|
].join(':'),
|
||||||
|
honorCipherOrder : true
|
||||||
};
|
};
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue