0

I have a .cer certificate, .key file and I would like to convert it to the .pem format.

How do I convert them to .pem?

  • That really depends on the types of the files you have. Both .cer and .key may be in PEM format already. Just open the files in your text editor of choice. If it is text with stuff like "--- BEGIN CERTIFCATE ---", then it is already PEM format. If it isn't, you'll need to find out what format you have. You can use the "file" utility, that should tell you what kind of file you're dealing with. – Andreas Rogge Nov 24 '22 at 18:55
  • Also, see https://serverfault.com/questions/254627/how-do-i-convert-a-cer-certificate-to-pem – Andreas Rogge Nov 24 '22 at 18:56

1 Answers1

0

Assuming you have the .key PK,
and .cer/.crt/.cert file in the correct format
(i think common-name is mandatory)

// in Linux

cat x.key x.cert > x.pem

// in Windows

copy /b x.key+x.cert x.pem
ZEE
  • 326
  • 3
  • 14