From d20f8d5e754633194e1f29dcf4e79056ae2dec71 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Mon, 22 Aug 2022 12:55:43 +0200 Subject: [PATCH] Fix acme refactoring --- src/reverseproxy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reverseproxy.js b/src/reverseproxy.js index 8da5692e3..a95584c90 100644 --- a/src/reverseproxy.js +++ b/src/reverseproxy.js @@ -369,7 +369,7 @@ async function ensureCertificate(subdomain, domain, auditSource) { return { certificatePath: getFallbackCertificatePathSync(domain), renewed: false }; } - const { acmeApi, apiOptions } = await getAcmeApi(domainObject); + const { acme2, apiOptions } = await getAcmeApi(domainObject); let notAfter = null; const [, acmeCertificatePath] = await safe(syncAcmeCertificate(subdomain, domainObject)); @@ -386,7 +386,7 @@ async function ensureCertificate(subdomain, domain, auditSource) { debug(`ensureCertificate: getting certificate for ${subdomain} with options ${JSON.stringify(apiOptions)}`); const acmePaths = getAcmeCertificatePathSync(subdomain, domainObject); - const [error] = await safe(acmeApi.getCertificate(subdomain, domain, acmePaths, apiOptions)); + const [error] = await safe(acme2.getCertificate(subdomain, domain, acmePaths, apiOptions)); debug(`ensureCertificate: error: ${error ? error.message : 'null'} cert: ${acmePaths.certFilePath || 'null'}`); await safe(eventlog.add(acmeCertificatePath ? eventlog.ACTION_CERTIFICATE_RENEWAL : eventlog.ACTION_CERTIFICATE_NEW, auditSource, { domain: subdomain, errorMessage: error ? error.message : '', notAfter }));