Fixed meshagent.txt when CertUrl is used.

This commit is contained in:
Ylian Saint-Hilaire 2019-04-10 11:54:55 -07:00
parent 8c1f61a454
commit 176d455e00
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "meshcentral",
"version": "0.3.2-d",
"version": "0.3.2-f",
"keywords": [
"Remote Management",
"Intel AMT",

View File

@ -2185,6 +2185,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
obj.db.Get(req.query.nodeid, function (err, nodes) {
if (nodes.length != 1) { res.sendStatus(401); return; }
var node = nodes[0];
// Create the meshaction.txt file for meshcmd.exe
var meshaction = {
action: req.query.meshaction,
@ -2195,7 +2196,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
username: '',
password: '',
serverId: obj.agentCertificateHashHex.toUpperCase(), // SHA384 of server HTTPS public key
serverHttpsHash: Buffer.from(obj.webCertificateHash, 'binary').toString('hex').toUpperCase(), // SHA384 of server HTTPS certificate
serverHttpsHash: Buffer.from(obj.webCertificateHashs[domain.id], 'binary').toString('hex').toUpperCase(), // SHA384 of server HTTPS certificate
debugLevel: 0
};
if (user != null) { meshaction.username = user.name; }
@ -2210,7 +2211,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
username: '',
password: '',
serverId: obj.agentCertificateHashHex.toUpperCase(), // SHA384 of server HTTPS public key
serverHttpsHash: Buffer.from(obj.webCertificateHash, 'binary').toString('hex').toUpperCase(), // SHA384 of server HTTPS certificate
serverHttpsHash: Buffer.from(obj.webCertificateHashs[domain.id], 'binary').toString('hex').toUpperCase(), // SHA384 of server HTTPS certificate
debugLevel: 0
};
if (user != null) { meshaction.username = user.name; }