From 269fed1f52645d34af609ebd8e7b93292920ac94 Mon Sep 17 00:00:00 2001 From: Jimmy Qin Date: Thu, 30 Oct 2025 23:16:25 +0100 Subject: [PATCH] luci-app-acme: Use fullchain.crt file to read issueDate The private key is used for applying the cert And the cert should be used for reading issueDate Signed-off-by: Jimmy Qin --- .../htdocs/luci-static/resources/view/acme/acme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/acme.js b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/acme.js index 9b165edade..9b09508367 100644 --- a/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/acme.js +++ b/applications/luci-app-acme/htdocs/luci-static/resources/view/acme/acme.js @@ -12,7 +12,7 @@ return view.extend({ L.resolveDefault(fs.list('/etc/ssl/acme/'), []).then(files => { let certs = []; for (let f of files) { - if (f.type == 'file' && f.name.match(/\.key$/)) { + if (f.type == 'file' && f.name.match(/\.fullchain\.crt$/)) { certs.push(f); } } @@ -521,7 +521,7 @@ function _renderCerts(certs) { ]); let rows = certs.map(function (cert) { - let domain = cert.name.substring(0, cert.name.length - 4); + let domain = cert.name.replace(/\.fullchain\.crt$/, ''); let issueDate = new Date(cert.mtime * 1000).toLocaleDateString(); return [ domain, -- 2.30.2