This tutorial will guide you on how to compile and install OpenSSL on 64bit Windows. In case you are looking for how to compile and build on 32 bit Windows, you may visit to the following page Compiling and Installing OpenSSL for 32 bit Windows to get more information.
The following steps will guide you further on how to accomplish this tutorial.
- Make sure that your system environment is able to build x64 project. If you are unsure that, please visit to the following page Enable a 64-Bit Visual C++ Toolset on the Command Line to find out more about setting your x64 build environment.
- Create a new folder C:\openssl-1.0.1g
- Download latest OpenSSL source from https://www.openssl.org/source/. I am using “openssl-1.0.1g.tar.gz” in this tutorial.
- Extract the file to C:\openssl-1.0.1g
- You will need to install Perl. Download & install ActiveState Perl @ ActiveState Perl
- Make sure you set “C:\perl\bin\” in the system path.
- Create a new folder “C:\openssl-1.0.1g-bin” which will hold all the built libraries in later.
- Open the command prompt windows.
- Run “call “c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd” /Release /x64″ to get visual studio environment setup.
- Browse to C:\openssl-1.0.1g
- Run “perl Configure VC-WIN64A no-asm – -prefix=C:\openssl-1.0.1g-bin”. This will configure to build using visual C++ in Win64 platform. Also, it will configure to install to “C:\openssl-1.0.1g-bin” in later step.
- Run “ms\do_win64a”.
- Run “nmake -f ms\ntdll.mak”. Compilation should start now and it will take some time to compile.
- Once the compilation is completed. You may test the output by running this command “nmake -f ms\ntdll.mak test”. You should get all the tests pass.
- It’s time to install the library now. Run this command “nmake -f ms\ntdll.mak install”. It will copy all the libraries to C:\openssl-1.0.1g-bin.
At this point, the OpenSSL libraries for 32 bit Windows should be ready.