diff --git a/backend/internal/certificate.js b/backend/internal/certificate.js index bde1bdca..50c615b7 100644 --- a/backend/internal/certificate.js +++ b/backend/internal/certificate.js @@ -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;