Microsoft has created a Linux subsystem that allows running Linux distributions on Windows 10. This blog describes the steps for building and running wolfSSL on WSL.
Installing WSL and Ubuntu 18.04:
- Open PowerShell as Administrator (right-click and choose “Run as Administrator”)
- Run the following commands:
- Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile Ubuntu.appx -UseBasicParsing
- Add-AppxPackage .\Ubuntu.appx
- Start -> Ubuntu 18.04 (should be at the top of the start menu)
- Installing, this may take a few minutes…
- Choose username and password
- Update Ubuntu:
- sudo apt update
- sudo apt upgrade
Building wolfSSL:
- Install prerequisites
- sudo apt-get install autoconf libtool make execstack
- git clone https://github.com/wolfSSL/wolfssl.git
- cd wolfssl
- ./autogen.sh
- ./configure
- make
- make check
Enabling Intel Speedups and Running Benchmarks:
- ./configure –enable-intelasm –enable-aesni –enable-sp –enable-sp-asm
- make
- WSL does not currently have support for the PROT_GROWSDOWN flag. Manually clear the executable stack flag in the library:
- execstack -c ./src/.libs/libwolfssl.so
- ./wolfcrypt/benchmark/benchmark
If you have any questions or run into any issues, contact us at facts@wolfssl.com, or call us at +1 425 245 8247.