mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 13:56:43 +00:00
Fix cert format
This commit is contained in:
@@ -380,6 +380,7 @@ export const registerPkiAcmeRouter = async (server: FastifyZodProvider) => {
|
||||
if (payload !== "") {
|
||||
throw new AcmeMalformedError({ detail: "Payload should be empty" });
|
||||
}
|
||||
res.type("application/pem-certificate-chain");
|
||||
return sendAcmeResponse(
|
||||
res,
|
||||
profileId,
|
||||
|
||||
@@ -683,7 +683,13 @@ export const pkiAcmeServiceFactory = ({
|
||||
}
|
||||
return {
|
||||
status: 200,
|
||||
body: order.certificate! + "\n" + order.certificateChain!,
|
||||
body:
|
||||
order.certificate!.trim().replace("\n", "\r\n") +
|
||||
"\r\n" +
|
||||
order.certificateChain!.trim().replace("\n", "\r\n") +
|
||||
// The final line is needed, otherwise some clients will not parse the certificate chain correctly
|
||||
// ref: https://github.com/certbot/certbot/blob/4d5d5f7ae8164884c841969e46caed8db1ad34af/certbot/src/certbot/crypto_util.py#L506-L514
|
||||
"\r\n",
|
||||
headers: {
|
||||
Location: buildUrl(profileId, `/orders/${orderId}/certificate`),
|
||||
Link: `<${buildUrl(profileId, "/directory")}>;rel="index"`
|
||||
|
||||
Reference in New Issue
Block a user