3 Methods on How to Install OpenSSL on Windows

Quick guides on how to download and install OpenSSL on Windows and generate CSR.

QUICK SUMMARY

  • You can download OpenSSL for Windows installer via https://slproweb.com/products/Win32OpenSSL.html
  • You can also use winget install -e –id ShiningLight.OpenSSL command to install OpenSSL on Windows.
  • In addition, you can find OpenSSL under C:\Program Files\Git\usr\bin\openssl.exe file path if you have Git for Windows installed

Rising cybercrimes have forced major stakeholders on the internet to take drastic steps. One of the major steps taken by Google through Google Chrome is to encourage all websites to implement HTTPS protocol. Now it is almost necessary for websites to have SSL certificates as a website without an SSL certificate will be marked as “Not Secure” by major browsers.

If you have a website or intend to develop one, OpenSSL can help you get an SSL certificate. This article will help you learn what OpenSSL is and how to install OpenSSL on Windows.

Part 1: What is OpenSSL?

OpenSSL is a widely used open-source implementation of the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols. These protocols are used to establish secure connections between computers over the internet and are used in a variety of applications. Its uses include web browsers, email clients, and other applications requiring secure communication. It is available for a variety of platforms, including Linux, Unix, Windows, and macOS.

© OpenSSL

Part 2: Why Do You Need to Install OpenSSL on Windows?

It is an important tool for developers working on projects using SSL/TLS to establish secure connections. Being a cryptographic SSL/TLS toolkit, OpenSSL is essential for those who work on digital certifications, security testing, and application testing. Using this tool, you can create your own Certificate Authority and convert digital certificates into different formats.

This tool also helps you validate the HTTPS connections for websites and generate an SSL license for your website. Its CSR or Certificate Signing Request feature is used when installing SSL files on your server. With this tool, you can also encrypt or decrypt files on your Windows computer. It can also help you test your server’s security using benchmark tests.

Part 3: How to Install OpenSSL on Windows?

If you want to use OpenSSL on Windows, you will need to install it first, as it doesn’t come pre-installed like other platforms. Different ways can be used to install OpenSSL on your Windows computer. Below, we have explained the three most common methods:

Method 1: Download OpenSSL for Windows Binary Distribution

The simplest method to install OpenSSL on your Windows computer is to use the OpenSSL installer. The  steps required to download and install Open SSL are following:

Step 1: Download the OpenSSL Installer and Start Installing

Use this link to download the latest OpenSSL installer file on your computer. There are 4 types of files available for 32-bit and 64-bit computers. Download your desired file and double-click to start the installation process.

Step 2: Setup the OpenSSL Installer on Your Computer

Once the installation window appears, accept the license agreement and decide on the installation location. A screen with “Select Additional Task” will appear. Here select the location to copy OpenSSL DLLs and press “Next.” On the next screen, tap “Install” to start the installation and wait for it to finish.

Step 3: Configure OpenSSL via CMD

To configure the newly installed OpenSSL, you will need to set Environment variables. Run the “Command Prompt” as an Administrator in your computer and run these commands to set up Environment variables for OpenSSL:

set OPENSSL_CONF=C:\OpenSSL-Win64\bin\openssl.cfg
set Path=%Path%;C:\OpenSSL-Win64\bin

Method 2: Install OpenSSL via Windows Package Manager

If you are a developer who doesn’t trust third-party apps to install tools on your system, you can use Windows Package Manager (aka winget) to install OpenSSL. It is a package manager that allows users to install, update, and manage software packages from the command line. The following steps outline OpenSSL installation via winget:

Step 1: Download and Install winget on Your Windows Computer

To install OpenSSL through Windows Package Manager or winget, you first need to check if winget is installed in your system. If it is not, download the “App Installer” from Microsoft Store to install winget.

📝 NOTE: winget is only available for users with Windows 10 1709 (build 16299) or later versions. You can try using the Chocolatey package manager if the winget is unavailable.

Step 2: Open the Command Prompt on Your System

Once Windows Package Manager or winget has been installed on your computer, open the Command Prompt. There are various ways to open CMD as an admin. Use the search bar to find “Command Prompt” and run it as Administrator.

Step 3: Install the OpenSSL through winget on Your Computer

You can also use the “Win + R” key to open the Run function and type “cmd,” and press the “CTRL + SHIFT + ENTER” key to open Command Prompt as Administrator. On the Command Prompt, run the following command line to install OpenSSL:

winget install -e --id ShiningLight.OpenSSL

Method 3: Use the Executable File from Git for Windows

Git for Windows is a version of Git, a popular version control system compiled specifically for Windows to use. Developers primarily use it for managing their code repositories and tracking changes to their codebase. The program also has a built-in openssl.exe file that can be used to install OpenSSL on Windows. Follow these steps to install OpenSSL through Git for Windows:

Step 1: Install Git for Windows on Your Computer

If Git for Windows is not installed on your computer, go to Git official website to download and install it. Wait for the installation and open the installation folder once completed.

Step 2: Find the OpenSSL Installer File and Run It

In the installation folder, you need to locate the openssl.exe file. It is located in the “bin” folder and can be accessed through the “usr” folder of the main “Git” folder. If you didn’t change the file path when installing Git, you can find the default location of openssl.exe under:

C:\Program Files\Git\usr\bin\openssl.exe

Step 3: Launch Git Bash to Run OpenSSL Commands

Once the file path is located, you can double click the exe program to run OpenSSL. Or you can also launch the Git Bash terminal, then enter the OpenSSL commands.

Part 4: How to Use OpenSSL to Generate CSR on Windows?

Once you are done with installing OpenSSL on your Windows computer, it is time to get your SSL license. As mentioned above, getting your SSL license requires CSR or Certificate Signing Request code which will be submitted to a Certificate Authority. Follow the detailed process given below to generate CSR on Windows through OpenSSL:

Step 1: Run the Command Prompt After Installing OpenSSL

When you have installed OpenSSL on your computer and configured it for use, run the Command Prompt to start the CSR generation process. Use the “Win + R” key to open the “Run” function. Here type “cmd” and use the “CTRL + SHIFT + ENTER” key to run Command Prompt as Administrator.

Step 2: Use Command to Open a Text-based Questionnaire

In the Command Prompt, run the “cd \OpenSSL-Win32\bin” command to move to the “bin” folder of OpenSSL. Here, run the following commands to open a text-based questionnaire that you need to fill out:

openssl genrsa -out private-key.key 2048
openssl req -new -key private-key.key -out csr.txt

Step 3: Fill Out the Questionnaire with the Required Information

You will need to provide information like country name, state or province, locality or city, company, organizational unit, and common name. Do not fill in the email address, challenge password, and optional company name. Once you are done with filling out the questionnaire, run these commands to move the private key and CSR file to a centralized directory:

md c:\certificate
move private-key.key c:\certificate
move csr.txt c:\certificate

Step 4: Copy the CSR Code and Proceed with Certificate Enrollment

With the files moved to a centralized directory, use this command to open the CSR file in Notepad:

notepad c:\certificate\csr.txt

In the Notepad, select all the content and copy it. You can not use the copied CSR code to apply for an SSL certificate from the respective Certificate Authority.

Final Words

In conclusion, OpenSSL is an important tool that any web owner needs as it can solve many issues related to web security. Even though it isn’t pre-installed on Windows, there are several ways to install OpenSSL on a Windows system. Hopefully, this article has helped you with OpenSSL installation and creating a CSR code for your website’s SSL license.

Avatar photo
Ahtasham Ahmad

Ahtasham is the Co-Founder of Visionary Merger. He is obsessed with the world of tech writing about software reviews, app testing, and detailed guides.

Leave a Reply

Your email address will not be published. Required fields are marked *