Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

eapol_test is traditionally only available on Linux. Instructions to build it for Linux and for Windows are below.

Linux

Build on Linux

Preparatory work

Install the usual build-tools:

...

Code Block
languagebash
sudo apt-get install libssl-dev

Building eapol_test

Download wpa_supplicant's source at https://w1.fi/releases/wpa_supplicant-2.9.tar.gz

...

Cross-compile on Linux for Windows

Preparatory work

Install Ubuntu 20.

Install MinGW:

...

Code Block
languagebash
sudo apt-get install build-essential

Configuration

Create the script file /usr/bin/mingw64

Code Block
languagebash
#!/bin/sh
PREFIX=x86_64-w64-mingw32
export CC=$PREFIX-gcc
export CXX=$PREFIX-g++
export CPP=$PREFIX-cpp
export AR=$PREFIX-ar
export AS=$PREFIX-as
export NM=$PREFIX-nm
export WINDRES=$PREFIX-windres
export RANLIB=$PREFIX-ranlib
export ADDR2LINE=$PREFIX-addr2line
export DLLTOOL=$PREFIX-dlltool
export DLLWRAP=$PREFIX-dllwrap
export ELFEDIT=$PREFIX-elfedit
export OBJCOPY=$PREFIX-objcopy
export OBJDUMP=$PREFIX-objdump
export READELF=$PREFIX-readelf
export SIZE=$PREFIX-size
export STRINGS=$PREFIX-strings
export STRIP=$PREFIX-strip
export WINDMC=$PREFIX-windmc
export GCOV=$PREFIX-gcov
export PATH="/usr/x86_64-w64-mingw32/bin:$PATH"
exec "$@"

Make it executable by all

Code Block
languagebash
sudo chmod a+x /usr/bin/mingw64

Building the sources

Download eapol_test.c.patch and eapol_test.config from https://github.com/janetuk/eapol_test

Download libtommath's source at https://github.com/libtom/libtommath/releases/download/v1.2.0/ltm-1.2.0.tar.xz

Download wpa_supplicant's source at https://w1.fi/releases/wpa_supplicant-2.9.tar.gz


Unpack the libtommath distribution. Note the directory you unpacked it to. You will need it when you build eapol_test.exe

Change to the libtommath directory. Run the build command

Code Block
languagebash
mingw64 make

This should now build successfully and leave you with a library in the directory.

...

Code Block
languagebash
CFLAGS=" -Wno-error=pointer-to-int-cast -MMD -O2 -g -w" mingw64 make eapol_test

You should now have an eapol_test.exe with around 6707168 bytes in size.

Copy this to a Windows box. Run it without parameters. It should display command-line parameters.

Testing with eapol_test

Testing with eapol_test on Linux or Windows will ultimately yield the same results. The configuration files for use with the utility are identical on either platform. Here is a sample configuration file you can use.

...