1

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-----

Zach
  • 1,263
  • 11
  • 25
IamNewbie
  • 17
  • 1
  • 6

1 Answers1

1

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
Marc
  • 19,394
  • 6
  • 47
  • 51
  • 1
    Thanks. It solved. I use "openssl x509 inform der -outform pem -in certificate.cer -out certificate.pem" – IamNewbie Oct 01 '20 at 01:34