Fix uploading of custom certificates

This commit is contained in:
Tech-no-1
2026-02-17 02:58:18 +01:00
parent 5916fd5bee
commit 40f363bd4f

View File

@@ -630,7 +630,7 @@ const internalCertificate = {
* @param {String} privateKey This is the entire key contents as a string * @param {String} privateKey This is the entire key contents as a string
*/ */
checkPrivateKey: async (privateKey) => { checkPrivateKey: async (privateKey) => {
const filepath = await tempWrite(privateKey, "/tmp"); const filepath = await tempWrite(privateKey);
const failTimeout = setTimeout(() => { const failTimeout = setTimeout(() => {
throw new error.ValidationError( throw new error.ValidationError(
"Result Validation Error: Validation timed out. This could be due to the key being passphrase-protected.", "Result Validation Error: Validation timed out. This could be due to the key being passphrase-protected.",
@@ -660,7 +660,7 @@ const internalCertificate = {
* @param {Boolean} [throwExpired] Throw when the certificate is out of date * @param {Boolean} [throwExpired] Throw when the certificate is out of date
*/ */
getCertificateInfo: async (certificate, throwExpired) => { getCertificateInfo: async (certificate, throwExpired) => {
const filepath = await tempWrite(certificate, "/tmp"); const filepath = await tempWrite(certificate);
try { try {
const certData = await internalCertificate.getCertificateInfoFromFile(filepath, throwExpired); const certData = await internalCertificate.getCertificateInfoFromFile(filepath, throwExpired);
fs.unlinkSync(filepath); fs.unlinkSync(filepath);