Installing OpenSSL

The OpenSSL library can be tricky to get going on Windows.

If you are brave, you can obtain the OpenSSL library source code directly from https://www.openssl.org/source/. You will, of course, need to build OpenSSL before it can be used. Building OpenSSL is not easy, but instructions are provided in the INSTALL and NOTES.WIN files included with the OpenSSL source code.

An easier alternative is to install prebuilt OpenSSL binaries. You can find a list of prebuilt OpenSSL binaries from the OpenSSL wiki at https://wiki.openssl.org/index.php/Binaries. You will need to locate binaries that match your operating system and compiler. Installing them will be a matter of copying the relevant files to the MinGW include, lib, and bin directories.

The following screenshot shows a binary OpenSSL distribution. The include and lib folders should be copied over to c:mingw and merged with the existing folders, while openssl.exe and the two DLL files need to be placed in c:mingwin:

You can try building openssl_version.c from Chapter 9, Loading Secure Web Pages with HTTPS and OpenSSL, to test that everything is installed correctly. It should look like the following:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.51.241