Tuesday, November 11, 2014

How to Install Openssl and configure/generate SSL certificate on windows

Download and Install OpenSSL:

The software can be downloaded from a source like Shining Light (https://slproweb.com/products/Win32OpenSSL.html).

-> The installation is pretty straight forward, Just remember the path of the installation as this path will be used while creating the key and csr.

For ex: I have installed the OpenSSL in C:\OpenSSL-win

-> Create a folder in any directory ( like C:\Openssl)

-> Run the command prompt with admin privileges and execute the following given command.

       set OPENSSL_CONF=c:\OpenSSL-win\bin\openssl.cfg

This will set a variable in windows configuration.

-> Generate the Key and Certificate request (CSR) by executing the below command.
     This command has to be run from the Openssl bin folder (C:\OpenSSL-win\bin)

       openssl req -nodes -sha256 -newkey rsa:2048 -keyout C:\Openssl\keyfile.key -out C:\Openssl\Certificaterequest.csr

-> You will be prompted for certificate fields like fqdn,location and state, enter those fields as they come up.

     This will generate two files
       a) keyfile.key
       b) Certificaterequest.csr -> This has to be sent to the valid signer to get the certificate.
      

0 comments:

Post a Comment