\n
(escaped new-line):
cer
, pem
) with a text editor, you’ll see something like this:
-----BEGIN CERTIFICATE-----
header and -----END CERTIFICATE-----
footer contain base64-encoded binary information. Public keys and private keys (.key files) will look similar, with just a different header/footer.
For a string representation of a certificate/key file, you will need to concatenate everything in one line, with a \n
(escaped new-line) sequence replacing the actual new lines in the file. So from the above sample you’d obtain something like this: