Fixed meshagent.txt when CertUrl is used.
Ylian Saint-Hilaire committed
Apr 10, 2019 at 11:54 UTC
176d455e00000c54feffc3e3d6b50e8bb7b02419
2 files changed
+4
-3
package.json
+1
-1
@@ -1,6 +1,6 @@
1
{
2
"name": "meshcentral",
3
- "version": "0.3.2-d",
3
+ "version": "0.3.2-f",
4
"keywords": [
5
"Remote Management",
6
"Intel AMT",
webserver.js
+3
-2
@@ -2185,6 +2185,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
2185
obj.db.Get(req.query.nodeid, function (err, nodes) {
2186
if (nodes.length != 1) { res.sendStatus(401); return; }
2187
var node = nodes[0];
2188
+
2189
// Create the meshaction.txt file for meshcmd.exe
2190
var meshaction = {
2191
action: req.query.meshaction,
@@ -2195,7 +2196,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
2196
username: '',
2197
password: '',
2198
serverId: obj.agentCertificateHashHex.toUpperCase(), // SHA384 of server HTTPS public key
2198
- serverHttpsHash: Buffer.from(obj.webCertificateHash, 'binary').toString('hex').toUpperCase(), // SHA384 of server HTTPS certificate
2199
+ serverHttpsHash: Buffer.from(obj.webCertificateHashs[domain.id], 'binary').toString('hex').toUpperCase(), // SHA384 of server HTTPS certificate
2200
debugLevel: 0
2201
};
2202
if (user != null) { meshaction.username = user.name; }
@@ -2210,7 +2211,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
2211
username: '',
2212
password: '',
2213
serverId: obj.agentCertificateHashHex.toUpperCase(), // SHA384 of server HTTPS public key
2213
- serverHttpsHash: Buffer.from(obj.webCertificateHash, 'binary').toString('hex').toUpperCase(), // SHA384 of server HTTPS certificate
2214
+ serverHttpsHash: Buffer.from(obj.webCertificateHashs[domain.id], 'binary').toString('hex').toUpperCase(), // SHA384 of server HTTPS certificate
2215
debugLevel: 0
2216
};
2217
if (user != null) { meshaction.username = user.name; }