mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed trusted FQDN used in setup.bin
This commit is contained in:
parent
8e40b44586
commit
fc1e084576
1 changed files with 11 additions and 1 deletions
|
@ -286,6 +286,16 @@ module.exports.CertificateOperations = function (parent) {
|
||||||
var setupbin = AmtSetupBinStack.AmtSetupBinCreate(3, 1); // Version 3, 1 = Records will not be consumed.
|
var setupbin = AmtSetupBinStack.AmtSetupBinCreate(3, 1); // Version 3, 1 = Records will not be consumed.
|
||||||
var certRootName = 'MeshCentral';
|
var certRootName = 'MeshCentral';
|
||||||
|
|
||||||
|
// Figure out what trusted FQDN to use.
|
||||||
|
var trustedFQDN = 'rootcert.meshcentral.com'; // Default DNS name. Any DNS name will do, we this is the fallback.
|
||||||
|
if (typeof domain.dns == 'string') {
|
||||||
|
// Use domain DNS name
|
||||||
|
trustedFQDN = domain.dns;
|
||||||
|
} else if (typeof parent.config.settings.cert == 'string') {
|
||||||
|
// Use main DNS name
|
||||||
|
trustedFQDN = parent.config.settings.cert;
|
||||||
|
}
|
||||||
|
|
||||||
// Create a new record
|
// Create a new record
|
||||||
var r = {};
|
var r = {};
|
||||||
r.typeIdentifier = 1;
|
r.typeIdentifier = 1;
|
||||||
|
@ -325,7 +335,7 @@ module.exports.CertificateOperations = function (parent) {
|
||||||
v.moduleid = 2;
|
v.moduleid = 2;
|
||||||
v.varid = 3;
|
v.varid = 3;
|
||||||
v.length = -1;
|
v.length = -1;
|
||||||
v.value = 'rootcert.meshcentral.com';
|
v.value = trustedFQDN;
|
||||||
setupbin.records[0].variables.push(v);
|
setupbin.records[0].variables.push(v);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue