Building OpenSSL can be quite straight-forward with a fair wind but it is a somewhat manual process to get it all setup.
The OpenSSL source is included in the /src folder as git submodules. A 64-bit and 32-bit directory is required as the build system leaves artifacts which can upset building of the other versions. The currently checked-out commit is the tagged-release 1_1_1d.
If you only want to get the built binaries then you don't need to clone the submodules - just use a normal git clone
To build yourself, clone this repository and its submodules with:
git clone --recursive <GIT_REPO_URL>And if you have already cloned the main repo then use:
git submodule init
git submodule updateThe OpenSSL library makes use of PERL for configuration of builds and uses NASM [The Netwide Assembler] to complete the build process so ensure the following tools are installed;
-
- Active Perl should be suitable but I had issues installing perl modules with
cpanas the MinGW tooling that Active Perl calls didn't install as expected so couldn't build the packages - maybe because I already have MinGW installed elsewhere. This means the perl-module installation would always fail.
- Active Perl should be suitable but I had issues installing perl modules with
-
Visual Studio (2015 used for this build)
-
Launch The Visual Studio Command Prompt.
- Building requires a number of Visual Studio tools which are most easily accessed via the Visual Studio Visual Studio Command Prompt (VS2015 [x86 or x64] Native Tools Command Prompt)
-
Ensure that
PERLandNASMtools are correctly installed and that Visual Studio'snmakeis available;-
For
PERLthe commandperl -vshould yield something similar to:This is perl 5, version 30, subversion 1 (v5.30.1) built for MSWin32-x86-multi-thread-64int ...etc. -
For
NASMthe commandnasm -vshould give you information on theNASMversion like:NASM version 2.14.02 compiled on Dec 26 2018
-
Finally
nmakeavailability should be verified with the commandnmake /?
If these tools aren't found then ensure they are available on your
PATHenvironmental-variable or you manually set thePATHvariable in the command prompt session. Ifnmakeis not found, check you are using the Visual Studio Command Prompt and consider re-installing Visual Studio. -
-
Instal the
PERLmodules as listed as required in NOTES.PERL with thecpantool, which itself needs setting up if you haven't used it before.-
To setup
cpanopen a command prompt with administrator-privileges and entercpanto launch the interactive cpan command-line -
Perform the automatic setup using the command
o conf init -
Use the default options and follow the instructions to commit the changes to the config
-
Exit the
cpaninteractive command-line with thequitcommand -
Install the required modules using:
cpan -i Text::Template cpan -i Test::More <optional install>
-
-
Run Visual Studio Command Prompt (VS2015 x64 Native Tools Command Prompt)
-
cdinto thesrc/64directory -
Run the following commands
perl Configure VC-WIN64A --prefix=<ABSOLUTE_PATH_TO_INSTALL> --openssldir=<ABSOLUTE_PATH_TO_INSTALL> nmake nmake test nmake install #(User Must be able to write to specified Install Directory for this to work)
-
Run Visual Studio Command Prompt (VS2015 x86 Native Tools Command Prompt)
-
ensure that the
rc.exetool from the x86 Windows Kit is accessible (I addedC:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86to my path user-variable) -
cdinto thesrc/32directory -
Run the following commands
perl Configure VC-WIN32 --prefix=<ABSOLUTE_PATH_TO_INSTALL> --openssldir=<ABSOLUTE_PATH_TO_INSTALL> nmake nmake test nmake install #(User Must be able to write to specified Install Directory for this to work)