How to convert .csr to .cer (or whatever usable on Windows)

martin picture martin · Aug 15, 2011 · Viewed 89.8k times · Source

I'm trying to figure out how to install .csr certificate under Windows but probably the only way is to convert it to some other format (maybe with openssl) but I have no idea how.

Do you have any suggestion?

Answer

dma_k picture dma_k · Aug 15, 2011

CSR file is the Certificate Signing Request. It contains the information which is needed to generate a certificate based on your private key and information about the WebSite.

CER is the certificate itself (which you install into your Web browser). There is basically no way to convert directly from one to another as you need a key to sign the certificate, but what can do is to generate a self-signed certificate (e.g. certificate signed by the same key which was used to generate it):

openssl x509 -req -in server.csr -signkey server.key -out server.crt