Build and Configure OpenSSL on Windows
The following series of steps could be a way to build OpenSSL sources in Windows.
Example of Building OpenSSL
Refer to the OpenSSL website for more details or other ways to build.
- Prerequisites
Make sure that you have installed all necessary tools as mentioned on the OpenSSL web page. Additionally, ensure that all these tools are accessible via your
%PATH%
setting. Here you will need:Perl
support (needed for configuration stage)- A suitable C compiler suite of your choice (in this example
we use the 32-bit version of “
mingw
”) - A “
make
” derivate compatible to the C compiler suite of your choice
- Configure:
- OpenSSL for 32 bits (this is done implicitly by the compiler you have selected)
- No multithreading (option: “no-threads”)
- Disabled assembly language (option: “no-asm”)
- Add support for weak ciphers (option:
“enable-weak-ssl-ciphers”, this is important if you plan use the
simulator with e. g. “single DES”
algorithm)
perl Configure mingw no-asm no-threads enable-weak-ssl-ciphers
You should see something like this at the end:********************************************************************** *** *** *** OpenSSL has been successfully configured *** *** *** *** If you encounter a problem while building, please open an *** *** issue on GitHub *** *** and include the output from the following command: *** *** *** *** perl configdata.pm --dump *** *** *** *** (If you are new to OpenSSL, you might want to consult the *** *** 'Troubleshooting' section in the INSTALL.md file first) *** *** *** **********************************************************************
- Run the build.
make
- (Optional) - Test
results.
make test
Configuring OpenSSL for the Simulator
-
The newly generated DLL files, namely:
libcrypto-3.dll
andlibssl-3.dll
are located in your local build directory. If you want to use the OpenSSL for Java Card Simulator only, copy these files into folder %JC_HOME_SIMULATOR%\runtime\bin
. If you however want to provide system-wide access, you can copy them into system folder %SystemRoot%\SysWow64
(in this case you can skip the step mentioned above). -
Use the Legacy provider for “weak SSL ciphers” by copying the additionally generated library file,
legacy.dll
, into the %JC_HOME_SIMULATOR%\runtime\bin
folder as well.