mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Started work MeshCentral2 legacy update path.
This commit is contained in:
parent
a550e9cf94
commit
3a5af0a1c9
5 changed files with 241 additions and 10 deletions
|
@ -185,6 +185,19 @@ module.exports.CertificateOperations = function () {
|
|||
rcount++;
|
||||
}
|
||||
|
||||
// If the swarm server certificate exist, load it (This is an optional certificate)
|
||||
if (obj.fileExists(directory + '/swarmserver-cert-public.crt') && obj.fileExists(directory + '/swarmserver-cert-private.key')) {
|
||||
var swarmServerCertificate = obj.fs.readFileSync(directory + '/swarmserver-cert-public.crt', 'utf8');
|
||||
var swarmServerPrivateKey = obj.fs.readFileSync(directory + '/swarmserver-cert-private.key', 'utf8');
|
||||
r.swarmserver = { cert: swarmServerCertificate, key: swarmServerPrivateKey };
|
||||
}
|
||||
|
||||
// If the swarm server root certificate exist, load it (This is an optional certificate)
|
||||
if (obj.fileExists(directory + '/swarmserverroot-cert-public.crt')) {
|
||||
var swarmServerRootCertificate = obj.fs.readFileSync(directory + '/swarmserverroot-cert-public.crt', 'utf8');
|
||||
r.swarmserverroot = { cert: swarmServerRootCertificate };
|
||||
}
|
||||
|
||||
// If CA certificates are present, load them
|
||||
var caok, caindex = 1, calist = [];
|
||||
do {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue