Convert letsencrypt .pem certificate to .pfx

I use Let’s Encrypt certificates in my Windows and Linux serves. This week I had to use the same certificate in two machines, one IIS server (Windows) and one Apache2 server (Linux Debian).

I create the certificate in Linux using certbot utility, ant it gave me four files:

  • cert.pem
  • chain.pem
  • fullchain.pem
  • privkey.pem

I installed to Apache with no problems.

But then I tried to install the certificate to IIS 6.1 and I realized that Windows did not want that type of file. With some research on the Internet I found a solution, using the command openssl (in Linux):

openssl pkcs12 -export -out certificateforwindows.pfx -inkey privkey.pem -in cert.pem -certfile fullchain.pem

I wish this helps someone

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *