diff --git a/lib/certificates.js b/lib/certificates.js index 5e18e9d49..c18b9f37b 100644 --- a/lib/certificates.js +++ b/lib/certificates.js @@ -141,7 +141,11 @@ export async function createCertificate ( { domains, maxAge, commonName, ...attr return { "certificate": `-----BEGIN CERTIFICATE----- -${ certificate.toString( "base64" ) } +${ certificate + .toString( "base64" ) + .split( /(.{64})/ ) + .filter( line => line ) + .join( "\n" ) } -----END CERTIFICATE----- `, "privateKey": crypto.KeyObject.from( keyPair.privateKey ).export( {