Fixed CIRA connections on latest NodeJS releases.
Ylian Saint-Hilaire committed
May 2, 2019 at 17:32 UTC
3845e3c1c2ea007ec6ad80e1ebcb5ebc69d298d5
3 files changed
+4
-3
certoperations.js
+1
-1
@@ -549,7 +549,7 @@ module.exports.CertificateOperations = function (parent) {
549
// Accelerators, used to dispatch work to other processes
550
const fork = require("child_process").fork;
551
const program = require("path").join(__dirname, "meshaccelerator.js");
552
- const acceleratorTotalCount = 1; //require("os").cpus().length; // TODO: Check if this accelerator can scale.
552
+ const acceleratorTotalCount = require("os").cpus().length; // TODO: Check if this accelerator can scale.
553
var acceleratorCreateCount = acceleratorTotalCount;
554
var freeAccelerators = [];
555
var pendingAccelerator = [];
mpsserver.js
+2
-1
@@ -32,7 +32,8 @@ module.exports.CreateMpsServer = function (parent, db, args, certificates) {
32
if (obj.args.mpstlsoffload) {
33
obj.server = net.createServer(onConnection);
34
} else {
35
- obj.server = tls.createServer({ key: certificates.mps.key, cert: certificates.mps.cert, requestCert: true, rejectUnauthorized: false, ciphers: "HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA", secureOptions: constants.SSL_OP_NO_SSLv2 | constants.SSL_OP_NO_SSLv3 | constants.SSL_OP_NO_COMPRESSION }, onConnection);
35
+ // Note that in oder to support older Intel AMT CIRA connections, we have to turn on TLSv1.
36
+ obj.server = tls.createServer({ key: certificates.mps.key, cert: certificates.mps.cert, minVersion: 'TLSv1', requestCert: true, rejectUnauthorized: false, ciphers: "HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA", secureOptions: constants.SSL_OP_NO_SSLv2 | constants.SSL_OP_NO_SSLv3 | constants.SSL_OP_NO_COMPRESSION }, onConnection);
37
//obj.server.on('secureConnection', function () { /*console.log('tlsServer secureConnection');*/ });
38
//obj.server.on('error', function () { console.log('MPS tls server error'); });
39
obj.server.on('newSession', function (id, data, cb) { if (tlsSessionStoreCount > 1000) { tlsSessionStoreCount = 0; tlsSessionStore = {}; } tlsSessionStore[id.toString('hex')] = data; tlsSessionStoreCount++; cb(); });
package.json
+1
-1
@@ -1,6 +1,6 @@
1
{
2
"name": "meshcentral",
3
- "version": "0.3.3-o",
3
+ "version": "0.3.3-p",
4
"keywords": [
5
"Remote Management",
6
"Intel AMT",