Creating a Self-Signed Cert in Windows using OpenSSL

Quickly create a self-signed certificate in Windows using OpenSSL. Includes step by step instructions and picture of final output.

Table of Contents

Steps

Creating .crt and .key

  1. Download OpenSSL directly with this link to sourceforge.net or from us using this link. You will be downloading version 1.1.1h_win32
  2. Open your downloads and extract the contents of the zip folder.
  3. Navigate inside the OpenSSL folder
  4. The top of File Explorer should show the current path. If OpenSSL was extracted to the downloads folder, it should say something close to “This PC > Downloads > OpenSSL”
    1. Type “cmd” in the folder path and hit the “Enter” key
  5. In the new command prompt window. It should have opened in the current working directory. Type the three commands.
    1. set OPENSSL_CONF=openssl.cnf
    2. openssl.exe
    3. req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt
  6. Follow the steps in the prompt to finish creating your self-signed cert

If successful it should look like the below image.

OpenSSL configuration

The .crt and the .key will be in the OpenSSL folder. 

Creating .pfx

  1. Type the below command
    1. pkcs12 -export -out certificatePFX.pfx -inkey privateKey.key -in certificate.crt
    2. Enter a password and confirm it
  2.  This will create the .pfx certificate
  3. Below is what the commands should look like with no problems. 

The .pfx will be in the OpenSSL folder. 

Sources

SourceForge.net – Download Software

Stackoverflow.com – Redirecting to the correct folder

helpcenter.gsx.com – Creating the SSL Cert

 

Tags

Contact Us