1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Cleaned up deprecation warning on NodeJS 10.x.

This commit is contained in:
Ylian Saint-Hilaire 2019-01-02 18:03:34 -08:00
parent 5d6bd55249
commit d7b60ccb07
19 changed files with 97 additions and 89 deletions

View file

@ -23,7 +23,7 @@ process.on('message', function (message) {
if (typeof message.key == 'number') { message.key = certStore[message.key].key; }
try {
const sign = crypto.createSign('SHA384');
sign.end(new Buffer(message.data, 'binary'));
sign.end(Buffer.from(message.data, 'binary'));
process.send(sign.sign(message.key).toString('binary'));
} catch (e) { process.send(null); }
break;