Openssl for windows x64 инструкция

Tutorial: OpenSSL provision on Windows 10 and Windows 11

OpenSSL was previously reserved for Linux operating systems or had to be compiled from the source code itself under Mac and Windows. With Win32/Win64 OpenSSL, the open source software library can also be run on 32-bit and 64-bit Windows OS (x86/i386) and can be integrated on Windows machines via installer.

OpenSSL is widely used and found by encryption in numerous application and secure connections, as well as for SSL/TLS connections HTTPS, including cryptography in SSH, OpenVPN and DNSSEC.

The Win32/Win64 OpenSSL installation project from Shining Light Productions (slproweb.com) carrying the ease of deployment of OpenSSL for Microsoft Windows. The installation consists of downloading and unpacking the binaries, which eliminates the need to compile source code.

Installation

This tutorial shows two methods to deploy OpenSSL on Windows 10 and Windows 11. The simple method right at the beginning, by running Windows Package Manager with hit the Windows-logo+R keys and enter cmd in the Run box then click OK, or press Windows and hit cmd then click the command prompt icon.


Click Start
and hit cmd

In the now opened command prompt ran the following command, if you are not authorized as administrator with the logged in user, you can select “Run as administrator”.

C:\> winget install openssl

The Windows package manager “winget” allows you to install applications and other packages by using the command line. If winget is started for the first time, you will be prompted to confirm the source agreement terms, by hit the Y key.

winget install openssl

The OpenSSL package is now installed. The second method is to download and install the package.

Install Win64 OpenSSL package manually

The table (screenshot) on the slproweb.com website contains the versions for Win32 and Win64 OpenSSL as EXE and MSI installers.

Download Win32_Win64 OpenSSL Installer for Windows

Website: https://slproweb.com/products/Win32OpenSSL.html

Recommended here is the latest version with the most commonly used essentials of Win64 OpenSSL v3.0.7, at the time of writing this article, it is Win64 OpenSSL v3.0.7 EXE Light, at the top of the first line.

Double-click to execute the file Win64OpenSSL_Light-3_0_7.exe will the setup wizard appears. Confirm the Windows Account Control (UAC) with Yes to continue the installation.

User Account Control

The setup wizard unpacks and copies the OpenSSL files.

Windows Setup openssl installing files

Set up the OpenSSL environment

After the OpenSSL files are copied and installed, the search path and environment variable are now added to the operating system, with Windows + R and paste SYSTEMPROPERTIESADVANCED and click OK.

SYSTEMPROPERTIESADVANCED

The System Properties window opens.

Windows System Properties

Click the Environment Variables button at the bottom.

Windows Environment Variables

In the lower area System Variables, select the Path line with the mouse and click on the Edit button.

Edit environment variable path

In the “Edit Environment Variables” window, click New to add the path to the OpenSSL-Win64\bin folder under Program files. The path in which the file openssl.exe is located can be found with Windows Explorer and copied to the clipboard, there is also the possibility to choose the path to the bin folder with the Browse button. Confirm the action with OK.

Now add another system variable with click New.

edit new system variable openssl conf

Enter OPENSSL_CONF in the Variable name field. In the next field insert the path to which the file openssl.cnf is located, here it is C:\Program Files\OpenSSL-Win64\bin\cnf\openssl.cnf

The installation is now complete and OpenSSL can be used. First of all, there is the opportunity to check the OpenSSL provisioned release.

C:\> openssl version -a
OpenSSL 3.0.7 1 Nov 2022 (Library: OpenSSL 3.0.7 1 Nov 2022)
built on: Tue Nov  1 16:04:12 2022 UTC
...
C:\> openssl version -d
OPENSSLDIR: "C:\Program Files\Common Files\SSL"

The OpenSSL Toolkit is a versatile utility with many options, but under Windows there is not the possibility of using the man page, as is known on Linux. However, the openssl help command provides context-sensitive help, such asopenssl help s_clientor useopenssl help x509oropenssl help reqto show just a few examples. Help is also offered on the documentation pages on the web, where manpages can also be found.

Useful OpenSSL Examples

A few of the most commonly used openssl command examples in the console are shown below, note that this is not a comprehensive collection of all possible applicable commands of this powerful open source toolkit.

openssl x509 -noout -text -in ca-cert.pem

Displaying and print the ca-cert.pem certificate file in plain text.

openssl req -text -noout -verify -in x509-check.csr

View and verify the contents of CSR x509-check.csr in plain text.

openssl rsa -check -in rootCA.key

Verify key consistency of the rootCA.key file.

openssl x509 -noout -modulus -in ca-cert.pem | openssl md5

Check md5 checksum of certificate ca-cert.pem file.

openssl crl2pkcs7 -nocrl -certfile servercert.pem -out c:\temp\servercert.p7b

Convert certificate from pem to p7b format and write to temp folder.

openssl pkcs12 -export -in rootCA.pem -inkey rootCA.key -out c:\temp\rootCA.p12 -name "PKCS12 certificate"

Convert certificate rootCA.pem to PKCS12 format as rootCA.p12 file.

openssl req -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout server.key -out server.crt

Generate SSL certificate and key on a single line, using SHA256 with RSA 2048 encryption, the certificate will be valid for 1 year.

openssl s_client -connect imap.gmail.com:993

Check connection to imap.gmail.com service 993 to get more useful results like than as in telnet.

openssl s_client -crlf -connect smtp.gmail.com:587 -starttls smtp

Try to connect service 587 on smtp.gmail.com using the starttls protocol, possibly to check a firewall policy for its effect.

openssl s_client -verify_quiet -brief www.ietf.org:443

Check protocol version and ciphersuite, peer certificate and hash used.

openssl rand -base64 20

Generate a random password in base64 using OpenSSL, can be used as a passphrase to hide private keys from spying eyes.

These were just a few examples, because openssl is a versatile toolkit that offers numerous application options.

Conclusion

The OpenSSL open-source library for cryptography is more important than ever and indispensable. Connections are encrypted and protected, so why shouldn’t the OpenSSL Toolkit be used on Windows? Creating and managing Digital X. 509 certificates, check algorithms for data encryption such as Chiper Suite, digital fingerprint, MD5 and SHA hash values can be checked, which was previously reserved only for Linux.

Sources Links:
slproweb.com Win32/Win64 OpenSSL Installation Project for Windows
openssl.org Cryptography and SSL/TLS Toolkit

OpenSSL is a small but powerful open-source, cross-platform utility which can be used in various digital PKI certificate activities. OpenSSL can be used to convert digital certificates from one to another format, export private keys from certificates, and build your own Certificate Authority. However, OpenSSL is included in basic packages in most of the popular Linux distributions. It is not required to install the OpenSSL on Linux. Well, the story is not similar in the case of the Windows platform. Don’t be disappointed since OpenSSL is a cross-platform utility that supports Windows, Linux, and Mac. You can install OpenSSL on the Windows platform with just a few clicks.

Why Should You Install OpenSSL On Windows?

First of all, OpenSSL is not for normal users. It is not mandatory to install OpenSSL on the Windows platform. As we said earlier, OpenSSL is a cryptographic SSL/TLS tool kit, which provides a wide range of solutions for those who work on Digital Certificates, SSL/TLS testing, application development or implementation, application testing, and security testing. There are a lot of things you can do using OpenSSL. Only a few of them are listed here:

  1. You can create your own Certificate Authority and issue certificates on your network. 
  2. Convert digital certificates from one format to another. 
  3. Export or Import private keys from the certificates.
  4. Validate the HTTPS connections to the destination website.
  5. Verify the certificate of the destination website.
  6. Run benchmark tests of your server and remote website.
  7. Extract information like issuer, subject, issued and expiring dates, and fingerprint from certificates.
  8. Create CSR.
  9. Decode CSR and Certificates to verify contents.

You can enjoy the features of OpenSSL if you have installed it on your Windows machine.
Let’s begin the procedure to install OpenSSL on the Windows platform.

How To Install OpenSSL On The Windows Platform?

The installation procedure is very simple and straightforward. You should download the OpenSSL installer, run it to install, and configure Environment variables.

Time needed: 10 minutes

How to Install OpenSSL on The Windows Platform?

  1. Download the OpenSSL installer

    Download the OpenSSL installer from the official OpenSSL download link: https://slproweb.com/products/Win32OpenSSL.html

    Download the OpenSSL installer for Windows

  2. Run the OpenSSL installer to install

    Execute the downloaded installer file and install the OpenSSL on the Windows machine.

    The installation procedure is quite simple and straight.
    1. Accept license agreement.
    2. Specify the Installation location.

    Specify the Installation location

  3. Initiate installing OpenSSL

    Set Start Menu location and the additional task then click on the Install button to initiate the OpenSSL installation.

    Initiate installing OpenSSL

  4. Installation in progress…….

    Installation of OpenSSL in progress

  5. Complete the installation of OpenSSL.

    The installation will take 5 to 10 seconds. Click Finish to complete the installation process.

    Finish installing OpenSSL

  6. Set Environment variable

    If you just want to set the environment varibles only for a login session, then run these commands.

    >set OPENSSL_CONF=C:\Program Files\OpenSSL-Win64\bin\openssl.cfg
    >set Path=
    C:\Program Files\OpenSSL-Win64\bin

    If you want to set the env variable for permanently, then add OPENSSL_CONF and Path env variable on System Properties.

    Open Run using ‘Windows’ + ‘r’ then type ‘sysdm.cpl‘. Go to Advanced > Environment Variable.

    Set OPENSSL_CONF and Path variables.

    Environment Variables to run OpenSSL on Windows

  7. Run OpenSSL

    Open the command prompt using ‘Windows’ + ‘r’ then type ‘cmd‘ to open command prompt.

    Type openssl version command on CLI to ensure OpenSSL is installed and configured on your Windows machine. You should see the version information if OpenSSL is configured correctly.

    Run OpenSSL on Windows

Thats’s it. This is how you can install OpenSSL on the Windows platform. Simple itn’t it?

Thanks for reading the small tutorial. Please follow us on this blog to see more such tutorials and security updates.

Frequently Asked Questions:

1. What is OpenSSL?

OpenSSL is an open-source software library that provides cryptographic functionality and implements the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols. It is widely used to secure communications over computer networks and to create, manage, and verify digital certificates.

2. Why should I install OpenSSL on my Windows computer?

Installing OpenSSL on your Windows computer allows you to perform various cryptographic operations, such as generating public and private keys, creating Certificate Signing Requests (CSRs), and managing SSL/TLS certificates. It is particularly useful for developers, system administrators, and cybersecurity professionals.

3. Can I install OpenSSL on other operating systems besides Windows?

Yes, OpenSSL is available for various operating systems, including Linux, macOS, and BSD. The installation process may vary depending on the platform, but the overall concepts remain the same.

4. How do I download OpenSSL for Windows?

You can download precompiled OpenSSL binaries for Windows from a trusted third-party website, such as the Shining Light Productions’ Win32/Win64 OpenSSL Installer (https://slproweb.com/products/Win32OpenSSL.html). Make sure to download the appropriate version (32-bit or 64-bit) according to your Windows operating system.

5. How do I install OpenSSL on my Windows computer?

To install OpenSSL on your Windows computer, follow these steps:
1, Download the OpenSSL installer from a trusted source.
2. Run the installer and follow the installation wizard.
3. During installation, choose a directory where OpenSSL will be installed (e.g., C:\OpenSSL).
4. Once the installation is complete, add the OpenSSL directory to your system’s PATH environment variable.
5. Verify the installation by opening a Command Prompt and entering openssl version. You should see the OpenSSL version number displayed.

6. How do I update OpenSSL on my Windows computer?

To update OpenSSL on your Windows computer, download the latest version of the OpenSSL installer from a trusted source and run the installer. The new version will replace the existing installation. Make sure to update your system’s PATH environment variable if the installation directory has changed.

8. How do I generate a self-signed SSL certificate using OpenSSL on Windows?

To generate a self-signed SSL certificate using OpenSSL on Windows, follow these steps:
1. Open a Command Prompt.
2. Navigate to the OpenSSL directory (e.g., C:\OpenSSL\bin).
3. Enter the following command to generate a private key:
openssl genrsa -out private_key.pem 2048
4. Enter the following command to create a self-signed SSL certificate:
openssl req -new -x509 -key private_key.pem -out certificate.pem -days 365
5. Fill in the required information when prompted.

9. Can I use OpenSSL to connect to a remote server using SSL/TLS?

Yes, you can use the openssl s_client command to connect to a remote server using SSL/TLS. For example, to connect to a secure website, you can enter the following command in a Command Prompt:
openssl s_client -connect example.com:443

10. How do I get help with OpenSSL commands on Windows?

To get help with OpenSSL commands on Windows, you can use the openssl help command in a Command Prompt. This will display a list of available commands and their brief descriptions. For more detailed information on a specific command, you can type openssl <command> -help, replacing <command> with the desired command. Additionally, you can refer to the official OpenSSL documentation (https://www.openssl.org/docs/) or seek assistance from online forums and communities.

Author Image

Arun KL

Hi All, I am Arun KL, an IT Security Professional. Founder of “thesecmaster.com”. Enthusiast, Security Blogger, Technical Writer, Editor, Author at TheSecMaster. To know more about me. Follow me on LinkedIn

What is OpenSSL?

OpenSSL is a single-system image clustering system that is open-source. It allows a group of computers to be viewed as a single colossal system, giving programs running on any one machine access to all of the cluster’s resources. [It is the culmination of a long development process that began with the development of LOCUS in the early 1980s.

OpenSSL allows a group of separate computers (nodes) to be regarded as one massive system. Processes running on any node have full access to all node resources.

Functionalities can be automatically transferred from node to node to balance system utilization. Alternatively, the cluster might be set up so that each node has direct access to the file system.

Step 1 Download OpenSSL Binaries

Link to Download OpenSSL binaries files: https://sourceforge.net/projects/openssl/files/

In our article, we are downloading 

https://sourceforge.net/projects/openssl/files/openssl-1.0.2j-fips-x86_64/

Step 2 Unpack OpenSSL Zip files

Unpack the content of (openssl-1.0.2j-fips-x86_64.zip) zip file into your desired location in our example we are using (D:\OpenSSL) folder 
This comes with three folders (bin, include & lib) as shown in the image

Step 3: Set OpenSSL Path in Windows path

We have extracted OpenSSL files in directory D:\OpenSSL\bin
So our OpenSSL path is D:\OpenSSL\bin

Open explorer and right-mouse click on This PC icon as shown in the image

Under System About window click on the Advanced system settings button

Under the System Property window click on the Environment Variables button

Under the Advanced Environment window select Path and then click on the Edit button

Under the Environment Variable window click on the New button

Paste the path of OpenSSL (D:\OpenSSL\bin) and click the OK button

Step 4: Set System Variable for OPENSSL_CONF

Now to set system variable for OPENSSL_CONF

Click on the New button under the System Variable window

Now add system variable values as given, the path to your openssl.conf file location as shown below, and click on the OK button

Name: OPENSSL_CONF
Value: D:\OpenSSL\bin\openssl.cnf

Now you can see that the system variable is set

For window 10 and 11 you don’t have to restart your system to effect changes, else you need to restart the system

Step5: Test OpenSSL

To test OpenSSL installed properly open the terminal and check the OpenSSL version

cmd: openssl version

If it displays the OpenSSL version then OpenSSL is installed properly.

Important Commands for Open SSL

Creating a Private Key

Private Key is very important it is required for all operations in SSL, this Private key is required to create a CSR file.

openssl genrsa -des3 -out mydomain-com.key 2048

It will ask for the password, please keep the password in a safe place because it is required in many places.

1. Create CSR Creating a Certificate Signing Request

CSR file is required to generate an SSL certificate.
This CSR file contains information about the certificate and private key

openssl req -key mydomain-com.key -new -out mydomain-com.csr

Information required by CSR:

Enter pass phrase for mydomain-com.key:
Country Name (2 letter code) [AU]:IN
State or Province Name (full name) [Some-State]:Haryana
Locality Name (eg, city) []:Gurgaon
Organization Name (eg, company) [Internet Widgits Pty Ltd]:myDomain
Organizational Unit Name (eg, section) []:IT
Common Name (e.g. server FQDN or YOUR name) []:www.mydomain.com
Email Address []:contact@mydomain.com

Please enter the following ‘extra’ attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

Important: Common Name is the Fully Qualified Domain Name for which you want an SSL certificate.
This CSR file is used by different SSL certificate companies to generate SSL Certificate 

Generate Private key and CSR with Single command.

openssl req -newkey rsa:2048 -keyout mydomain-com.key -out mydomain-com.csr

Creating a Self-Signed Certificate

A self-Signed Certificate is an SSL certificate is generated by using your own private key, it is not used for commercial purposes because it shows a warning that says the certificate is not trusted.

So self-signed certificate can be used for development and testing purposes.

openssl x509 -signkey mydomain-com.key -in mydomain-com.csr -req -days 365 -out mydomain-com.crt

Convert CRT file to PFX file

The .pfx file is required to install an SSL certificate in the windows system, this file contains Private Key and SSL certificate.

openssl pkcs12 -export -out mydomain-com.pfx -inkey mydomain-com.key -in mydomain-com.crt

Generate SHA265 Key from .crt file

openssl x509 -in mydomain.crt -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64

Output:

XXXXXXxxXXXXXXXXXXXXXXXxXXXXxXXXX121XX=

Generate PF12 file .crt file

openssl pkcs12 -export -out yourdomain.com.p12 -inkey yourdomain.com.key -in yourdomain.crt -certfile CACert.crt

yourdomain.com.key: is the key file, it get generated when we create .CSR file
CACert.crt : root certificate, it comes with SSL certificate bundel file.
yourdomain.crt: is the main certificate file

OpenSSL is a widely-used tool for working with Secure Socket Layer (SSL) and Transport Layer Security (TLS) protocols. It is commonly used for creating and managing SSL/TLS certificates, which are used to secure network communications and establish the identity of websites and other online services. If you are a Windows user and need to use OpenSSL, you will need to install it on your computer before you can start using it.

Method 1: Install OpenSSL Using Binary Executables

Step 1: Download OpenSSL Binary Executables

  • Go to the OpenSSL website and download the latest version of OpenSSL for Windows.
  • Choose the appropriate version for your system (32-bit or 64-bit).
  • Extract the downloaded file to a directory of your choice.

Step 2: Set Environment Variables

  • Open the Start menu and search for «Environment Variables».
  • Click on «Edit the system environment variables».
  • Click on the «Environment Variables» button.
  • Under «System Variables», click on «New».
  • Enter «OPENSSL_CONF» as the variable name and the path to the OpenSSL configuration file (openssl.cnf) as the variable value.

Step 3: Test OpenSSL Installation

  • Open the Command Prompt and type «openssl version» to check if OpenSSL is installed correctly.
  • If installed correctly, the version number of OpenSSL will be displayed.

Step 4: Use OpenSSL

  • OpenSSL can be used for a variety of purposes, such as generating SSL certificates, creating secure connections, and encrypting data.
  • Here are some examples of how to use OpenSSL:

Generate a Private Key and Certificate Signing Request (CSR)

openssl req -newkey rsa:2048 -nodes -keyout example.key -out example.csr

Generate a Self-Signed SSL Certificate

openssl req -x509 -newkey rsa:2048 -nodes -keyout example.key -out example.crt -days 365

Encrypt a File using AES-256

openssl enc -aes-256-cbc -in example.txt -out example.enc

Decrypt a File using AES-256

openssl enc -aes-256-cbc -d -in example.enc -out example.txt

Create a Secure Connection to a Server

openssl s_client -connect example.com:443

Verify a Certificate Chain

openssl verify -CAfile example.crt example.pem

Method 2: Install OpenSSL from Source Code

Here are the steps to install OpenSSL from source code on Windows 10:

  1. Download the latest OpenSSL source code from the official website.

  2. Extract the downloaded file to a directory on your computer.

  3. Open the Visual Studio command prompt as an administrator.

  4. Navigate to the directory where you extracted the OpenSSL source code.

  5. Run the following command to configure OpenSSL:

    This command configures OpenSSL to build for 64-bit Windows using Visual Studio.

  6. Run the following command to build OpenSSL:

    This command builds OpenSSL using the configuration from the previous step.

  7. Run the following command to install OpenSSL:

    This command installs OpenSSL to the default directory.

  8. Add the OpenSSL binaries directory to your system path.

    setx /M PATH "%PATH%;C:\OpenSSL-Win64\bin"

    This command adds the OpenSSL binaries directory to your system path permanently.

  9. Verify that OpenSSL is installed correctly by running the following command:

    This command should output the version of OpenSSL that you installed.

That’s it! You have successfully installed OpenSSL from source code on Windows 10.

Method 3: Use a Package Manager

To install OpenSSL on Windows 10 using a package manager, you can follow the steps below:

  1. Install Chocolatey package manager by running the following command in an elevated PowerShell prompt:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
  1. Once Chocolatey is installed, run the following command to install OpenSSL:
choco install openssl.light
  1. After installation, you can verify the OpenSSL version by running the following command:

This should output the OpenSSL version installed on your system.

That’s it! With just a few simple commands, you can install OpenSSL on your Windows 10 machine using a package manager.

Method 4: Use a Pre-built Package

OpenSSL is a widely-used open source tool that provides support for the SSL and TLS protocols. It is used to secure communications between servers and clients over a network. In this tutorial, we will learn how to install OpenSSL on Windows 10 using a pre-built package.

Step 1: Download the Pre-built Package

The first step is to download the pre-built package of OpenSSL for Windows. You can download it from the official website of OpenSSL (https://www.openssl.org/). Choose the version that is compatible with your operating system and architecture.

Step 2: Install OpenSSL

Once you have downloaded the pre-built package, extract it to a folder on your system. Then, open a command prompt with administrative privileges and navigate to the folder where you extracted the package.

Next, run the following command to install OpenSSL:

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

This will set the environment variables required for OpenSSL to work properly.

Step 3: Verify the Installation

To verify that OpenSSL has been installed correctly, run the following command in the command prompt:

This should display the version of OpenSSL that you have installed on your system.

Step 4: Use OpenSSL

Now that OpenSSL has been installed on your system, you can use it to generate SSL certificates, sign certificates, and perform other tasks related to SSL and TLS protocols.

For example, to generate a self-signed SSL certificate, run the following command:

    > openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365

This will generate a new RSA private key and a self-signed SSL certificate that is valid for 365 days. The private key will be saved in the file «key.pem», and the SSL certificate will be saved in the file «cert.pem».

  John Mwaniki /   07 Jan 2022

In this article, you will learn what OpenSSL is, what it is used for, how to download and install it on your Windows PC and add its path to the environment variables in order to use it in your command prompt.

What is OpenSSL?

OpenSSL is a robust open-source software library/toolkit for general-purpose cryptography and secure communication.

OpenSSL allows users to perform various SSL related tasks, such as CSR (Certificate Signing Request), private keys generation, and SSL certificate installation.

It is available for Linux, Windows, macOS, and BSD systems. It comes pre-installed in most Linux distributions. However, if you are on Windows, you will have to install it yourself.

How to install OpenSSL in Windows

Follow the steps below to install OpenSSL on your Windows PC.

Step 1: Download the OpenSSL Installer for Windows. Choose the version that applies to your PC. In my case, I will download Win64 OpenSSL v3.0.1 (Light version).

Downloading OpenSSL for Windows

Step 2: Run the just downloaded OpenSSL installer from your download folder or from whichever directory you select during the download by double-clicking on it.

Running the OpenSSL installer Step 3: Accept the license agreement then hit the «Next» button to proceed. Accept the licence agreement

Step 4: Click on the «Next» button. You can also choose a difference installation directory at this point. I recommend you leave that as it is. Not this directory somewhere as you will require it later.

OpenSSL installation directory

Step 5: Click on the «Next» button.

OpenSSL start menu folder

Step 6: Click on the «Next» button.

OpenSSL additional tasks

Step 7: Click on the «Install» button to start the installation process.

Install OpenSSL

Step 8: At this point the installation is complete. There is an option to donate checked by default. Uncheck the box if you don’t want to donate then click on the «Finish» button to exit the installer.

FInishing the OpenSSL installation

At this point, you can start using OpenSSL on your PC. However, there is another important step that is not a must but very helpful.

Add the OpenSSL PATH in Windows environment variables

By default, after installation, OpenSSL is only available from the directory where it resides (C:\Program Files\OpenSSL-Win64\bin).

This means that if you try to use OpenSSL from the command line (command prompt) in any other directory than the above, the command will not be recognized and won’t work. It will give you something like the below.

OpenSSL not recognized in windows

It is more convenient to run OpenSSL commands from any directory of your choice on your PC. To do that, you have to add its PATH in the Environment Variables.

To do so, follow the following steps:

Step 1: Search for «Environment Variables» by pressing the Windows button and typing the term «Environment Variables». Click on the «Edit the system environment variables«.

Opening the environment variables dialog

Step 2: Click on the «Environment Variables» button.

Clicking on the environment variables button

Step 3: In the screen that appears, select the Path and then click on the «Edit» button.

Environment variables path

Step 4: Click on the «browse» button.

Environment variables browse

Step 5: Browse through folders to «This PC > Windows (C:) > Program Files > OpenSSL — Win64 > bin». Make sure «bin» is selected at the box labeled folder at the bottom, then hit the «OK» button.

Selecting OpenSSL bin folder

You should now be able to see the newly added OpenSSL path at the top of the other(s). Now click «OK» on this screen and the subsequent screens.

We are now done and you can start running the OpenSSL commands in the command prompt in any directory of your choice.

Note: If you already had the command prompt open before doing this process, you will need to close and reopen it for this to work.

That’s it!

It’s my hope you were able to follow along and it has helped you.

Понравилась статья? Поделить с друзьями:
  • Openmediavault raspberry pi 4 пошаговая инструкция
  • Openear wave инструкция на русском
  • Opendiag инструкция по работе приложения
  • Opendiag инструкция по применению на андроид
  • Openbox x820ci инструкция по эксплуатации