openssl

20 August 2019 Link

This page lists a script that I have used successfully to download and compile openssl. The script was extracted from Paul Kulchenko's Zerobrane Studio project build script for windows linked here.

The script is:
  1. # In its current form this script generated the dlls successfully (Ran it from the msys console C:\mingw\msys\1.0\msys.bat)
  2. # run this using the bash shell
  3. BIN_DIR="$(dirname "$PWD")/bin"
  4.  
  5. # temporary installation directory for dependencies
  6. INSTALL_DIR="$PWD/deps"
  7.  
  8. OPENSSL_BASENAME="openssl-1.0.2h"
  9. OPENSSL_FILENAME="$OPENSSL_BASENAME.tar.gz"
  10. OPENSSL_URL="http://www.openssl.org/source/$OPENSSL_FILENAME"
  11.  
  12. # create the installation directory
  13. mkdir -p "$INSTALL_DIR" || { echo "Error: cannot create directory $INSTALL_DIR"; exit 1; }
  14.  
  15. # build openSSL
  16. wget --no-check-certificate -c "$OPENSSL_URL" -O "$OPENSSL_FILENAME" || { echo "Error: failed to download OpenSSL"; exit 1; }
  17. tar -xzf "$OPENSSL_FILENAME"
  18. cd "$OPENSSL_BASENAME"
  19. # Try the Configure option if it does not work
  20. # The dll files are libeay32.dll and ssleay32.dll
  21. bash Configure mingw shared
  22. #./Configure shared mingw
  23. #perl Configure mingw shared
  24. #./config
  25. make
  26. #make test
  27. # The install step will place the static libraries in the deps directory and these libraries can then be used to link to other projects like LuaCrypto
  28. make install_sw INSTALLTOP="$INSTALL_DIR"
  29. cd ..


Just create an empty directory, place the script file there. Open the msys terminal and run the script from there.