wolfSSL Examples Repository

Upcoming Blog Series

From the early days of the wolfSSL library, we have provided example clients and servers with wolfSSL. These examples have shown how easy it is to use wolfSSL in various configurations. We also use them to help test the library. Over the years we’ve added new features available with TLS to our examples, and our examples have grown a little complicated.

Enter the wolfSSL Examples GitHub repository. This repository contains example clients and servers that set up and test various types of connections. They give you a bare-bones simple demonstration on how to set up a client or server using wolfSSL. In addition to these client/servers, our developers have included examples that demonstrate how to build wolfSSL with specific real time operating systems and TCP/IP stacks for embedded systems and devices, how to link with the wolfSSL library with a simple Enclave, and even how to use some features of the library like the certificate manager or wolfCrypt’s public-key functionality.

The repository contains example applications written in C, each directory represents a unique topic (TLS, DTLS, PSK, etc.) and contains a Makefile as well as a simple tutorial on the given topic. The wolfSSL Examples GitHub repository is a great way to gain familiarity with the wolfSSL lightweight SSL/TLS library so this upcoming blog series will be showcasing it and each topic/directory it contains. Here’s a comprehensive list of the topics to be covered.

android (Android NDK Examples)

This directory contains examples that demonstrate using wolfSSL and wolfSSLJNI on the Android platform, using the Android NDK toolchain.

BTLE

This directory contains examples for securing a Bluetooth Low Energy Link (BTLE). BTLE packets are small and throughput is low, so these examples demonstrate a way to exchange data securely without BTLE pairing.

certfields (X509 field extraction)

This directory contains an example that demonstrates using wolfSSL to read a DER encoded certificate and extract the public key and subject name information.

certgen (wolfSSL Certificate Generation)

This directory contains examples that demonstrate using wolfSSL to generate and sign certificates.

certmanager (wolfSSL CertManager)

This directory contains examples that demonstrate using CertManager (Certificate Manager) functionality.

crypto (wolfCrypt Examples)

This directory contains examples that demonstrate using the wolfCrypt functionality to encrypt files with different algorithms (AES, 3DES, etc.)

custom-io-callbacks (wolfSSL Custom IO Callbacks)

This directory contains examples that demonstrate how the custom IO callbacks can be used to facilitate a TLS connection using any medium.

DTLS (Datagram TLS)

This directory contains examples of using DTLS, with client and server examples demonstrating UDP, DTLS, non-blocking, session resumption, and multi-threading.

ecc (Elliptic Curve Cryptography)

This directory contains examples that demonstrate the various use-cases of wolfCrypt ECC.

embedded (Embedded Systems)

This directory contains examples that demonstrate TLS client/servers communicating through buffers and using sockets.

hash (wolfCrypt Hash Examples)

This directory contains examples that demonstrate how to hash an input file using wolfCrypt.

java (wolfJSSE Examples)

This directory contains examples that demonstrate HTTPS URL use with wolfJSSE and example keystores.

mynewt (Apache Mynewt Examples)

This directory contains examples that demonstrate using wolfSSL with Apache Mynewt OS.

picotcp (picoTCP Examples)

This directory contains a TLS server created by using picoTCP via wolfSSL custom callbacks.

pk (Public-Key)

This directory contains examples that demonstrate various wolfCrypt public-key functionality (storing and loading keys after generation, extracting public key from private key, etc.).

pkcs11 (PKCS #11)

This directory contains examples of using wolfSSL’s PKCS #11 feature and a TLS server example using a PKCS 11 based key.

pkcs7 (PKCS #7)

This directory contains example applications that demonstrate usage of the wolfCrypt PKCS#7/CMS API, included in the [wolfSSL embedded SSL/TLS library].

PSK (Pre-Shared Keys)

This directory contains examples of using PSK, with client and server examples demonstrating TCP/IP, PSK, non-blocking, session resumption, and multi-threading.

riot-os-posix-lwip (RIOT-OS)

This directory contains examples that demonstrate how to use wolfSSL TLS sockets over RIOT-OS POSIX sockets.

RT1060 (i.MX RT1060-EVK)

This directory contains a wolfCrypt benchmark test application for i.MX RT1060-EVK.

SGX_Linux (Linux Enclave)

This directory contains an example application, written in C, which demonstrates how to link the wolfSSL lightweight SSL/TLS library with a simple Enclave (SGX) using Linux .

SGX_Windows (Windows Enclave)

This directory contains an example application, written in C++, which demonstrates how to link the wolfSSL lightweight SSL/TLS library with a simple Enclave (SGX) using Windows.

signature (Sign and Verify Examples)

This directory contains examples that demonstrate using wolfSSL to sign and verify binary data (supports RSA and ECC for signing and MD2, MD4, MD5, SHA, SHA224, SHA256, SHA384 and SHA512).

tirtos_ccs_examples (TI-RTOS)

This directory contains a client/server example that demonstrates using wolfSSL in a TI-RTOS ecosystem.

TLS

This directory contains examples of using SSL/TLS, with client and server examples demonstrating TCP/IP, SSL/TLS, non-blocking, session resumption, and multi-threading.

utasker (uTasker wolfSSL Example Tasks)

This directory contains example uTasker client and server tasks that demonstrate using wolfSSL with the uTasker stack. These have been tested on the uTasker Simulator.

wolfCLU (wolfSSL Command Line Utility)

This is a tool to provide command line access to wolfCrypt cryptographic libraries. wolfSSL command line utility will allow users to encrypt or decrypt a user specified file to any file name and extension.

Please contact wolfSSL at support@wolfssl.com with any questions, bug fixes, or suggested feature additions.

wolfSSL supports TLS 1.3 ! http://www.wolfssl.com/tls13

Checkout out latest release: https://www.wolfssl.com/download