Search code examples
sslssl-certificatex509certificateosquery

Error: failed to find any PEM data in certificate input when start to run fleet server


certificate.cer

1

When I use cat command to read certificate.cer in my Linux RH server. It come out with those unknown symbol as mentioned in attached picture instead of human readable language such as:

-----BEGIN CERTICATE-----

uiocudcnysyndw77e3fo7nfdslaccu...

-----END CERTIFICATE-----


Solution

  • This is because CER (or BER or DER) and PEM are different formats. PEM is base64-encoded DER with extra header/footer.

    To convert between the former and PEM, use openssl:

    openssl x509 -inform der -in certificate.cer -out certificate.pem