From 52e38726494eb08763dc21e3691746348b732e91 Mon Sep 17 00:00:00 2001 From: ingalls Date: Thu, 7 Mar 2024 14:56:52 -0700 Subject: [PATCH] Fix Cert Gen --- api/lib/api/credentials.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/lib/api/credentials.ts b/api/lib/api/credentials.ts index 07d94f63d..89f46c0ad 100644 --- a/api/lib/api/credentials.ts +++ b/api/lib/api/credentials.ts @@ -58,8 +58,12 @@ export default class { body: keys.csr }); + let cert = '-----BEGIN CERTIFICATE-----\n' + res.signedCert; + if (!res.signedCert.endsWith('\n')) cert = cert + '\n'; + cert + '-----END CERTIFICATE-----'; + return { - cert: '-----BEGIN CERTIFICATE-----\n' + res.signedCert + '\n-----END CERTIFICATE-----', + cert, key: keys.clientKey } }