acme2: do not rely on db

This commit is contained in:
Girish Ramakrishnan
2026-01-17 13:21:50 +01:00
parent 53c90429d3
commit 3a1cd8f67f
2 changed files with 6 additions and 7 deletions

View File

@@ -422,7 +422,12 @@ async function ensureCertificate(location, options, auditSource) {
}
debug(`ensureCertificate: ${fqdn} needs acme cert`);
const [error] = await safe(acme2.getCertificate(fqdn, domainObject));
const [error, result] = await safe(acme2.getCertificate(fqdn, domainObject));
await blobs.setString(`${blobs.CERT_PREFIX}-${certName}.key`, result.key);
await blobs.setString(`${blobs.CERT_PREFIX}-${certName}.cert`, result.cert);
await blobs.setString(`${blobs.CERT_PREFIX}-${certName}.csr`, result.csr);
debug(`ensureCertificate: error: ${error ? error.message : 'null'}`);
await safe(eventlog.add(eventlog.ACTION_CERTIFICATE_NEW, auditSource, { domain: fqdn, errorMessage: error?.message || '' }));