From 2bf9e9b21355b23cd5d89bfdb487e7bc02e457e0 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Mon, 18 May 2026 15:52:52 +1000 Subject: [PATCH] Support different cert info output in new version of debian --- backend/internal/certificate.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/internal/certificate.js b/backend/internal/certificate.js index e37100e62..a93bf8575 100644 --- a/backend/internal/certificate.js +++ b/backend/internal/certificate.js @@ -686,10 +686,18 @@ const internalCertificate = { // Examples: // subject=CN = *.jc21.com // subject=CN = something.example.com + // CN=something.example.com const regex = /(?:subject=)?[^=]+=\s+(\S+)/gim; const match = regex.exec(result); if (match && typeof match[1] !== "undefined") { certData.cn = match[1]; + } else { + // CN is likely formatted differently + const regex11 = /CN=(\S+)/gim; + const match11 = regex11.exec(result); + if (match11 && typeof match11[1] !== "undefined") { + certData.cn = match11[1]; + } } const result2 = await utils.execFile("openssl", ["x509", "-in", certificateFile, "-issuer", "-noout"]);