DEV Community

Reishi Mitani
Reishi Mitani

Posted on

Getting started with wolfssl

#c

First, clone the repository. This is going to take some time.

git clone https://github.com/wolfssl/wolfssl
Cloning into 'wolfssl'...

// will take a few minutes
Enter fullscreen mode Exit fullscreen mode

Enter the directory and run autogen

$ cd autogen.sh
$ sh autogen.sh
glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
glibtoolize: copying file 'build-aux/ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:22: installing 'build-aux/compile'
configure.ac:24: installing 'build-aux/config.guess'
configure.ac:24: installing 'build-aux/config.sub'
configure.ac:28: installing 'build-aux/install-sh'
configure.ac:28: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
Enter fullscreen mode Exit fullscreen mode

After finishing, run the following.

$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
....
   * IoT-Safe:                   no
   * IoT-Safe HWRNG:             no
   * NXP SE050:                  no
   * PSA:                        no

---

$ make check
/Applications/Xcode.app/Contents/Developer/usr/bin/make -j17  check-recursive
make[2]: warning: -jN forced in submake: disabling jobserver mode.
  CC       wolfcrypt/src/src_libwolfssl_la-hmac.lo
  CC       wolfcrypt/benchmark/benchmark.o
....
/Applications/Xcode.app/Contents/Developer/usr/bin/make -j17  check-TESTS
make[3]: warning: -jN forced in submake: disabling jobserver mode.
make[4]: warning: -jN forced in submake: disabling jobserver mode.
SKIP: scripts/openssl.test
SKIP: scripts/external.test
PASS: testsuite/testsuite.test
PASS: scripts/resume.test
PASS: scripts/google.test
PASS: scripts/tls13.test
PASS: scripts/unit.test
============================================================================
Testsuite summary for wolfssl 5.5.0
============================================================================
# TOTAL: 7
# PASS:  5
# SKIP:  2
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
Enter fullscreen mode Exit fullscreen mode

Finally, install the library.

sudo make install
Password:
Enter fullscreen mode Exit fullscreen mode

We can try out sample samples as below.

// In one window
$ ./examples/server/server

// In another
./examples/client/client
Enter fullscreen mode Exit fullscreen mode

Using software like Wireshark, we can see that the server and the client are talking to each other using encrypted data.

Image description

Top comments (0)