I have exported my certificates in DER
encodig (with the extension .cer).
Is there a way to convert those certificates in Base-64
encoding (with the same extension)?
Thanks
-
1The extension (as all the filename) is irrelevant. It only exists to make human life easier, computers do not care, only the content of the file matters for them. "Base-64 encoding" is called PEM in the "SSL" world.– Patrick MevzekNov 25, 2019 at 17:39
2 Answers
To convert from a DER to a base64, you can use certutil :
certutil -encode filename.cer newfilename.cer
And from a base64 to a DER, you can use :
certutil -decode filename.cer newfilename.cer
-
-
1
certutil
is not part of the OpenSSL suite of tools as far as I know. Nov 21, 2019 at 14:52
As you have the openssl
tag on your question, you should use:
openssl x509 -inform der -in infile.cer -out outfile.cer
In the reverse direction:
openssl x509 -outform der -in infile.cer -out outfile.cer