use .cer instead of .cert extension for certificate, as it's more standard

Massimo Melina committed Feb 22, 2024 at 14:05 UTC 5c89c3b7ba9938b5ef5026aa8f8675ea49911dfa
2 files changed +2 -2
src/acme.ts
+1 -1
@@ -84,7 +84,7 @@ async function generateSSLCert(domain: string, email?: string, altNames?: string
84 export const makeCert = debounceAsync(async (domain: string, email?: string, altNames?: string[]) => {
85 if (!domain) return new ApiError(HTTP_BAD_REQUEST, 'bad params')
86 const res = await generateSSLCert(domain, email, altNames)
87 - const CERT_FILE = 'acme.cert'
87 + const CERT_FILE = 'acme.cer'
88 const KEY_FILE = 'acme.key'
89 await fs.writeFile(CERT_FILE, res.cert)
90 await fs.writeFile(KEY_FILE, res.key)
src/adminApis.ts
+1 -1
@@ -127,7 +127,7 @@ export const adminApis: ApiHandlers = {
127 async save_pem({ cert, private_key, name='self' }) {
128 if (!cert || !private_key)
129 return new ApiError(HTTP_BAD_REQUEST)
130 - const files = { cert: name + '.cert', private_key: name + '.key' }
130 + const files = { cert: name + '.cer', private_key: name + '.key' }
131 await writeFile(files.private_key, private_key)
132 await writeFile(files.cert, cert)
133 return files