In response to what Paul <nos...@needed.invalid> wrote :
> You have to be a detective, as much as a CS grad.
Hi Paul,
You successfully talked me out of it. :)
There must be people who actually enjoy all the problems that come with
compiling from source, but I'm not one of them.
<
https://stackoverflow.com/questions/40007633/how-to-compile-openssl-on-windows>
Googling, it seems, as you inferred, it's rather complex to compile the
openssl binary from source code, where, for example, you have to use C and
not C++ compilers, and it matters what version you're compiling.
<
https://www.ski-epic.com/2007_notes_on_openssl/>
For example, below OpenSSL version 1.0.2 they use a different build system
than above OpenSSL version 1.1.0 where the instructions are different.
Also, version 1.1.0 and above requires PERL 5.10 or higher, which I don't
have installed (and which I don't feel like installing just to write a
tutorial).
<
https://github.com/my-devices/sdk/wiki/Building-OpenSSL-on-Windows>
There are apparently a bunch of gotchas, e.g., if you make a typo and end
up specifying a non-existent option, the configure scripts will proceed
without warning anyway.
In addition, there are platform specific options you have to know about,
apparently, such as Windows Vista needing the "no-async" option for OpenSSL
version 1.1.0 and higher.
Worse, it's mostly on Linux that people build it, so the best Windows
guides were written in 2012 apparently, and hence are only available on the
wayback machine.
o Building OpenSSL for Visual Studio
<
https://web.archive.org/web/20161123004257/http://developer.covenanteyes.com/building-openssl-for-visual-studio//>
In summary, it's not going to be easy to write a general purpose tutorial,
and, since I don't have the need for compiling the source, it's not gonna
happen I don't think.
Besides, you need the following _just_ to contemplate compiling it:
o Perl
o GNU C (Cygwin or MinGW)
o NASM (in some cases)
Apparently MS visual Studio for C/C++ would work though.
<
https://wiki.openssl.org/index.php/Compilation_and_Installation>
1. Ensure you have perl installed on your machine
(e.g. ActiveState or Strawberry), and available on your %PATH%
2. Ensure you have NASM installed on your machine,
and available on your %PATH%
3. Obtain the source files from <
https://www.openssl.org/source/>
4. Extract the source files to your folder
cd c:\myPath\openssl
5. Launch Visual Studio tool x64 Cross Tools Command prompt
6. Goto your defined folder cd c:\myPath\openssl
7. Configure for the target OS with perl Configure VC-WIN64A
or other configurations to be found in the INSTALL file
(e.g. UNIX targets).
For instance: perl Configure VC-WIN64A.
8. (Optional) In case you compiled before on 32 or 64-bits,
make sure you run nmake clean to prevent trouble across 32
and 64-bits which share output folders.
9. Now build with: nmake
10. Output can be found in the root of your folder as
libcrypto-1_1x64.dll and libssl-1_1-x64.dll
(with all the build additionals such as .pdb .lik or static .lib).
You may check this is true 64bit code using the Visual Studio tool
'dumpbin'. For instance
dumpbin /headers libcrypto-1_1x64.dll | more
and look at the FILE HEADER section.
11. Test the code using the 'test' make target, by running nmake test.
12. Reminder, clean your code to prevent issues the next time
you compile for a different target. See step 7.
I'll leave it at that for now since I'm not gonna actually do it,
for two reasons:
a. It's harder than I would have hoped (just to write a tutorial),
b. The pre-compiled binary from xxx work just fine for my needs.
<
https://curl.haxx.se/windows/dl-7.69.1_2/openssl-1.1.1g_2-win64-mingw.zip>
<
https://curl.haxx.se/windows/dl-7.69.1_2/openssl-1.1.1g_2-win32-mingw.zip>
--
Usenet is a place for adults to gather to politely discuss technical stuff.