From 25f0d0ab8e95886088753f8fb390e62b72eb5d46 Mon Sep 17 00:00:00 2001 From: Noah Zalev Date: Sun, 8 Aug 2021 15:18:58 -0400 Subject: [PATCH] Bugfix: reference to undefined object --- certoperations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certoperations.js b/certoperations.js index 9202e444..dc173b8b 100644 --- a/certoperations.js +++ b/certoperations.js @@ -180,7 +180,7 @@ module.exports.CertificateOperations = function (parent) { } else if ((typeof acmconfig.certfiles == 'object') && (typeof acmconfig.keyfile == 'string')) { // PEM format, certfiles and keyfile 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)))); if ((r.certs.length < 2) || (r.keys.length != 1)) continue; }