1
0
Fork 0
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:
Ylian Saint-Hilaire 2017-11-03 17:01:30 -07:00
parent a550e9cf94
commit 3a5af0a1c9
5 changed files with 241 additions and 10 deletions

View file

@ -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 {