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
Asked
Active
Viewed 2.6k times
7

Warok
- 185
- 1
- 2
- 6
-
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 Mevzek Nov 25 '19 at 17:39
2 Answers
13
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

garethTheRed
- 4,539
- 14
- 22
4
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

perko
- 56
- 3
-
-
1`certutil` is not part of the OpenSSL suite of tools as far as I know. – garethTheRed Nov 21 '19 at 14:52