mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-28 08:05:53 -05:00
Merge pull request #3007 from nzalev/bugfix-certoperations-joinpath
Bugfix certoperations joinpath #3005
This commit is contained in:
commit
b26593f5ff
@ -180,8 +180,8 @@ module.exports.CertificateOperations = function (parent) {
|
|||||||
} else if ((typeof acmconfig.certfiles == 'object') && (typeof acmconfig.keyfile == 'string')) {
|
} else if ((typeof acmconfig.certfiles == 'object') && (typeof acmconfig.keyfile == 'string')) {
|
||||||
// PEM format, certfiles and keyfile
|
// PEM format, certfiles and keyfile
|
||||||
r = { certs: [], keys: [] };
|
r = { certs: [], keys: [] };
|
||||||
for (var k in acmconfig.certfiles) { r.certs.push(obj.pki.certificateFromPem(obj.fs.readFileSync(obj.common.joinPath(obj.parent.datapath, acmconfig.certfiles[k])))); }
|
for (var k in acmconfig.certfiles) { r.certs.push(obj.pki.certificateFromPem(obj.fs.readFileSync(parent.common.joinPath(obj.parent.datapath, acmconfig.certfiles[k])))); }
|
||||||
r.keys.push(obj.pki.privateKeyFromPem(obj.fs.readFileSync(obj.parent.joinPath(obj.parent.datapath, acmconfig.keyfile))));
|
r.keys.push(obj.pki.privateKeyFromPem(obj.fs.readFileSync(parent.common.joinPath(obj.parent.datapath, acmconfig.keyfile))));
|
||||||
if ((r.certs.length < 2) || (r.keys.length != 1)) continue;
|
if ((r.certs.length < 2) || (r.keys.length != 1)) continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user