Convert DER .cer format to Base64 .CER

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


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

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