Skip to content

Commit 13fbc53

Browse files
committed
Fix bug when adding invalid custom certs
1 parent d19f5c1 commit 13fbc53

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/internal/certificate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,8 @@ const internalCertificate = {
660660
* @param {Boolean} [throwExpired] Throw when the certificate is out of date
661661
*/
662662
getCertificateInfo: async (certificate, throwExpired) => {
663+
const filepath = await tempWrite(certificate, "/tmp");
663664
try {
664-
const filepath = await tempWrite(certificate, "/tmp");
665665
const certData = await internalCertificate.getCertificateInfoFromFile(filepath, throwExpired);
666666
fs.unlinkSync(filepath);
667667
return certData;

0 commit comments

Comments
 (0)