Installing OpenSSL on Windows 10 and updating PATH
I recently discovered a convoluted way to build an iOS .ipa package without using a MacBook. It involves many steps, one of which is using OpenSSL for Windows. Instead of creating one huge blog post with all steps defined in detail, I decided to split them up in bite-size articles. This is one of them. Here I will teach you to do the following:
- Install OpenSSL
- Add OpenSSL to your PATH
This step is a simple one. Simply choose the version that applies to your PC from here. As example, I chose the Win64 OpenSSL v1.1.1g MSI (not the light version) from the table:
Run the EXE or MSI with default settings till completion and that should take care of installing OpenSSL!
Add OpenSSL to your PATH
Why do we want to do this? First off, it’s not a necessity, it just makes it more convenient to use OpenSSL from the command line in the directory of your choice. After the initial install, the openssl.exe is only available from the directory where it resides, namely:
You could open a command prompt from here and perform the operations you want, but as I am using this to create a Certificate Signing Request (CSR) for a specific purpose, I like to create that from the directory where I’d like to keep that CSR. To do that, lets add it to our PATH, which we can find in the Environment Variables. Here we go:
- Hit the Windows button on your keyboard or click it in the task bar, then search for “Environment Variables”.
- In the following screen, click “Environment Variables”.
- A screen will pop up showing User variables and System variables. In the User variables section, select Path and click Edit.
- Click on Browse.
- Go to where the openssl.exe is, which should be at “This PC > Windows (C:) > Program Files > OpenSSL - Win64 > bin” and select that folder. Click OK.
- You should see it added at the top. Make sure to click OK on this screen and the subsequent screens.
- Let’s verify that OpenSSL is now accessible from outside its own directory by opening a Command Prompt in an arbitrary location (I just opened the Command Prompt and left it at its default directory). Enter
openssl versionand see the result.
Important note: if you already had a command prompt open, you will need to close and reopen in order for this to work. Michael Galloway thank you for this remark!
And that’s it! You should now be able to use OpenSSL from the directory you desire.