ANSI C Based OPC UA Client/Server SDK
1.8.1.381
|
The following sections descibe how to compile OpenSSL for Visual Studio 2008 and higher without patented algorithms.
You will need tar to unpack the OpenSSL source package. Download and install Cygwin from https://cygwin.com/install.html. The default installation includes tar.
Additionally, Perl is required. You can use the package provided by Cygwin. Note that Perl is not part of a standard Cygwin installation but has to be selected manually.
To use Perl in a Visual Studio Command Prompt, it is necessary to add the directory <cygwin_install_dir>\bin (e.g. c:\cygwin64\bin) to the PATH environment variable.
The actions described in the following steps may differ depending on the libraries to be compiled for debug or release mode. This will be noted in each step below if applicable.
Furthermore, it is described what files to modify to append a “d” to the filename for debug mode if you inted to use debug and release libraries side by side.
Download the most recent version of OpenSSL from http://www.openssl.org/source/. Start a cygwin terminal, navigate to the folder containing the downloaded archive and unpack it:
Still in the Cygwin terminal, change to the OpenSSL folder extracted in the previous step.
Enter the following command to create Makefiles without patented algorithms (replace VC-WIN32
with VC-WIN64I
on IA-64 systems and VC-WIN64A
on AMD-64 systems):
To create a debug library, open the file do_ms.bat in the subfolder ms. Replace the following lines
with
On 64 bit systems, edit the respective lines in the file do_win64a.bat or do_win64i.bat.
Start a Visual Studio Command Prompt (there’s a shortcut inside the Visual Studio Start Menu entry, the exact name depends on your Visual Studio version) and change to the recently extracted openssl folder.
Then call the batch file to create Makefiles (on 64 bit systems call do_win64a.bat or do_win64i.bat).
If the operation succeeds, you can find the Makefiles nt.mak and ntdll.mak in the folder ms.
If you want the debug libraries to have an additional “d” at the end of the filename, open the file libeay32.def and replace the line
with
and in the file ssleay32.def the line
with
Then open the files ntdll.mak and nt.mak and edit the variables CRYPTO and SSL as shown below:
Now we are ready to compile the libraries. For dynamically linked libraries, enter
For static libraries, enter
Further information about how to compile OpenSSL can be found in the files INSTALL.W32 and INSTALL.W64 respectively.
Finally, it is necessary to copy the files to the SDK folder structure. Create a folder named
<SDK Installation Directory>\third-party\win<32/64>\vs<version>\openssl
A similarly named folder, containing the precompiled OpenSSL binaries shipped with the SDK, should already exist below third-party.