Fix bug when adding invalid custom certs

This commit is contained in:
Jamie Curnow
2026-02-10 14:54:33 +10:00
parent d19f5c1960
commit 13fbc53591

View File

@@ -660,8 +660,8 @@ const internalCertificate = {
* @param {Boolean} [throwExpired] Throw when the certificate is out of date
*/
getCertificateInfo: async (certificate, throwExpired) => {
const filepath = await tempWrite(certificate, "/tmp");
try {
const filepath = await tempWrite(certificate, "/tmp");
const certData = await internalCertificate.getCertificateInfoFromFile(filepath, throwExpired);
fs.unlinkSync(filepath);
return certData;