acme: getCertificate can be async now

This commit is contained in:
Girish Ramakrishnan
2021-09-07 09:34:23 -07:00
parent 5a955429f1
commit e7f51d992f
2 changed files with 6 additions and 8 deletions

View File

@@ -410,7 +410,7 @@ async function ensureCertificate(vhost, domain, auditSource) {
debug('ensureCertificate: getting certificate for %s with options %j', vhost, _.omit(apiOptions, 'accountKeyPem'));
const acmePaths = getAcmeCertificatePathSync(vhost, domainObject);
let [error] = await safe(util.promisify(acmeApi.getCertificate)(vhost, domain, acmePaths, apiOptions));
let [error] = await safe(acmeApi.getCertificate(vhost, domain, acmePaths, apiOptions));
debug(`ensureCertificate: error: ${error ? error.message : 'null'} cert: ${acmePaths.certFilePath || 'null'}`);
await safe(eventlog.add(currentBundle ? eventlog.ACTION_CERTIFICATE_RENEWAL : eventlog.ACTION_CERTIFICATE_NEW, auditSource, { domain: vhost, errorMessage: error ? error.message : '', notAfter }));