Example applications using the wolfSSL lightweight SSL/TLS library
 
 
 
 
 
 
Go to file
aidan garske fd9727cea0 Assert the static memory checks by exit code instead of a pipefail grep that BSD make lacks 2026-07-22 17:40:40 -07:00
.github Skip uefi-static in the lint make -n loop so it does not clone 2026-07-22 12:59:10 -07:00
Arduino
CSharp Run the C# pq client/server pair under mono 2026-07-22 08:52:42 -07:00
ESP32 Remove the ENC28J60 server's duplicate driver copy that main already builds 2026-07-22 08:52:42 -07:00
RPi-Pico
RT1060 Give RT1060 a current_time so the benchmark stops needing clock_gettime 2026-07-22 08:52:42 -07:00
Renesas/cs+/RH850
SE050 Assert the real se050 wolfcrypt result instead of an early sub-test line 2026-07-22 10:16:46 -07:00
SGX_Linux Give the examples Makefiles a consistent wolfSSL prefix 2026-07-22 08:52:42 -07:00
SGX_Windows
STM32
TOPPERS
X9.146 Migrate the single-entry exec examples to mode check and fold their inputs into the check targets 2026-07-22 12:41:59 -07:00
android Define WOLFSSL_CERT_REQ so the ndk-gradle app links wolfssljni's X509_REQ calls 2026-07-22 08:52:42 -07:00
btle Ignore SIGPIPE in the btle fifo transport 2026-07-22 08:52:41 -07:00
caam/seco
can-bus Exit the can-bus client on EOF and give it real input in CI 2026-07-22 08:52:42 -07:00
ccb_vaultic
certfields Make example check targets catch real failures with pipefail exit checks and inputs 2026-07-22 12:19:21 -07:00
certgen Fix four make check assertions that misfired under pipefail 2026-07-22 12:59:10 -07:00
certmanager Make example check targets catch real failures with pipefail exit checks and inputs 2026-07-22 12:19:21 -07:00
certs Add CI that builds and runs every example against wolfSSL master and stable 2026-07-22 08:52:42 -07:00
certstore Make example check targets catch real failures with pipefail exit checks and inputs 2026-07-22 12:19:21 -07:00
certvfy Make example check targets catch real failures with pipefail exit checks and inputs 2026-07-22 12:19:21 -07:00
cmake
cra-kit
crypto Return nonzero from pkcs12-create-example on a failed create so the check is not a false pass 2026-07-22 17:40:40 -07:00
custom-io-callbacks Confirm the custom-io file transfer succeeded so CI can assert it 2026-07-22 08:53:31 -07:00
dtls Read the earlydata reply in the DTLS client so it processes the session ticket 2026-07-22 08:53:32 -07:00
dtls-mcast
ebpf Port the ebpf tracers to the libbpf 1.0 perf_buffer__new signature 2026-07-22 08:52:42 -07:00
ecc Make example check targets catch real failures with pipefail exit checks and inputs 2026-07-22 12:19:21 -07:00
embedded Give the examples Makefiles a consistent wolfSSL prefix 2026-07-22 08:52:42 -07:00
freertos
fullstack/freertos-wolfip-wolfssl-https Retry the fullstack HTTPS probe so a slow sim start does not fail it 2026-07-22 08:53:31 -07:00
hash Make example check targets catch real failures with pipefail exit checks and inputs 2026-07-22 12:19:21 -07:00
hsm wolfHSM: add DTLS client example that uses HSM as cryptographic back end (#555) 2026-07-22 08:37:34 -06:00
http-message-signatures
java Track the wolfSSL dilithium.c to wc_mldsa.c rename and drop a stale java import 2026-07-22 08:52:42 -07:00
kernel/bsdkm
lwip
maxq10xx
meta-wolfssl-linux-fips
mynewt Widen the mynewt pointer prints so they build on a 64 bit native BSP 2026-07-22 08:52:42 -07:00
ocsp Make example check targets catch real failures with pipefail exit checks and inputs 2026-07-22 12:19:21 -07:00
picotcp
pk Return nonzero from rsa-kg on any key generate or write failure 2026-07-22 17:40:40 -07:00
pkcs7 Assert the actual verify result in the pkcs7 and rsa-nb checks 2026-07-22 13:02:15 -07:00
pkcs11 Report a failing PKCS#11 example instead of always exiting 0 2026-07-22 08:52:42 -07:00
pq Make example check targets catch real failures with pipefail exit checks and inputs 2026-07-22 12:19:21 -07:00
psa Link the PSA library the README's PSA_LIB_PATH names 2026-07-22 08:52:42 -07:00
psk
puf
riot-os-posix-lwip
rtl8735b
scripts Add CI that builds and runs every example against wolfSSL master and stable 2026-07-22 08:52:42 -07:00
signature Fix four make check assertions that misfired under pipefail 2026-07-22 12:59:10 -07:00
staticmemory Assert the static memory checks by exit code instead of a pipefail grep that BSD make lacks 2026-07-22 17:40:40 -07:00
stsafe
tirtos_ccs_examples
tls Read the earlydata reply so the client processes the session ticket before resuming 2026-07-22 08:53:32 -07:00
tls-options
tpm
uefi-library Call the always-present MLDSA context API from the UEFI driver 2026-07-22 10:16:46 -07:00
uefi-static Link wolfentropy.o and keep wc_port socket helpers out of the UEFI build 2026-07-22 08:52:42 -07:00
utasker
x509_acert Make example check targets catch real failures with pipefail exit checks and inputs 2026-07-22 12:19:21 -07:00
.gitignore Add CI that builds and runs every example against wolfSSL master and stable 2026-07-22 08:52:42 -07:00
.gitmodules
README.md wolfHSM: add DTLS client example that uses HSM as cryptographic back end (#555) 2026-07-22 08:37:34 -06:00

README.md

wolfSSL Example Applications

This repository contains example applications, written in C, which demonstrate how to use the wolfSSL lightweight SSL/TLS library for secure communication.

Each directory represents a unique topic (SSL/TLS, DTLS, PSK, etc.) and contains a Makefile as well as a simple tutorial on the given topic.

Current Examples

android (Android Studio and NDK Examples)

This directory contains examples that demonstrate using wolfSSL, wolfSSL JNI/JSSE, and wolfCrypt JNI/JCE on the Android platform. Examples use either Android Studio with Gradle or the Android NDK standalone toolchain.

Please see the android/README.md for further usage and details.


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.

Please see the btle/README.md for further usage and details.


can-bus

This directory contains an example echo server/client using wolfSSL over CAN bus with an ISO-TP transport layer. It can be used with a virtual CAN bus in Linux.

Please see the can-bus/README.md for further usage and details.


certfields (X509 field extraction)

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

Please see the certfields/README.md for further usage and details.


certgen (wolfSSL Certificate Generation)

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

Please see the certgen/README.md for further usage and details.


certmanager (wolfSSL CertManager)

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

Please see the certmanager/README.md for further usage and details.


crypto (wolfCrypt Examples)

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

Please see the crypto/README.md for further usage and details.


CSharp (C# Wrapper Examples)

This directory contains examples that demonstrate using the C# wrapper.

Please see the CSharp/README.md for further usage and details.


custom-io-callbacks (wolfSSL Custom IO Callbacks)

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

Please see the custom-io-callbacks/README.md for further usage and details.


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.

When compiling wolfSSL for use with these examples, wolfSSL will need to be compiled with DTLS support:

cd wolfssl-[version]
./configure --enable-dtls

Examples in this directory may be compiled using:

cd ./dtls
make

Please see the dtls/README.md for further usage and details.


ecc (Elliptic Curve Cryptography)

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

Please see the ecc/README.md for further usage and details.


ESP32 (Espressif)

This directory contains examples for the Espressif ESP32 chips.

Please see the ESP32/README.md for further usage and details.


embedded (Embedded Systems)

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

Please see the embedded/README.md for further usage and details.


hash (wolfCrypt Hash Examples)

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

Please see the hash/README.md for further usage and details.


java (wolfJSSE Examples)

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

Please see the java/README.md for further usage and details.


mynewt (Apache Mynewt Examples)

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

Please see the mynewt/README.md for further usage and details.


picotcp (picoTCP Examples)

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

Please see the picotcp/README.md for further usage and details.


picotcp (picoTCP Examples)

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

Please see the picotcp/README.md for further usage and details.


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.).

Please see the pk/README.md for further usage and details.


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.

Please see the pkcs11/README.md for further usage and details.


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].

It includes examples of several different content types (EncryptedData, SignedData, EnvelopedData, CompressedData), and demonstrates both signing/encrypting and verifying/decrypting operations.

Please see the pkcs7/README.md for further usage and details.


PUF (SRAM Physically Unclonable Function)

This directory contains a bare-metal example demonstrating wolfCrypt's SRAM PUF support. It derives device-unique cryptographic keys from the power-on state of SRAM memory using a BCH(127,64,t=10) fuzzy extractor with HKDF key derivation. Tested on NUCLEO-H563ZI (Cortex-M33).

Please see the puf/README.md for further usage and details.


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.

When compiling wolfSSL for use with these examples, wolfSSL will need to be compiled with PSK support:

cd wolfssl-[version]
./configure --enable-psk

Examples in this directory may be compiled using:

cd ./psk
make

Please see the psk/README.md for further usage and details.


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

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

Please see the riot-os-posix-lwip/README.md for further usage and details.


RT1060 (i.MX RT1060-EVK)

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

Please see the RT1060/README.md for further usage and details.


NXP SE050

This directory contains example applications for NXP's SE050. The examples have been tested on a Raspberry Pi with SE050 EdgeLock.

Please see the SE050/README.md for further details.


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 using Linux. The example has been tested with Ubuntu 16.04.

Please see the SGX_Linux/README.md for further usage and details.


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 using Windows.

Please see the SGX_Windows/README.md for further usage and details.


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).

Please see the signature/README.md for further usage and details.


tirtos_ccs_examples (TI-RTOS)

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

Please see the tirtos_ccs_examples/README.md for further usage and details.


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.

Examples in this directory may be compiled using:

cd ./tls
make

Please see the tls/README.md for further usage and details.


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.

Please see the utasker/README.md for further usage and details.


hsm (wolfHSM Examples)

This directory contains examples demonstrating wolfSSL integration with wolfHSM, a portable Hardware Security Module framework.

Please see the hsm/README.md for further details.


uefi-static (wolfCrypt UEFI application Example)

This directory contains an example UEFI application that runs wolfcrypt test.

Please see the uefi-static/README.md for further usage and details.


http-message-signatures (RFC 9421 HTTP Message Signatures)

This directory contains examples that demonstrate RFC 9421 HTTP Message Signatures using wolfCrypt Ed25519, including a signing example, client/server demo, and test vectors for RFC 9421 Appendix B.2.6.

Please see the http-message-signatures/README.md for further usage and details.


cra-kit (wolfSSL CRA Kit)

This directory is not a TLS/crypto tutorial. It demonstrates how to generate wolfSSL component SBOMs (SPDX + CycloneDX), nest them in a fictional product SBOM, and understand optional bomsh build provenance (Linux host only) for EU Cyber Resilience Act-style software transparency.

Includes a CRA compliance shortlist, a who provides what cheat sheet, full glossary, AI playbook, sample customer-side auditor packet (fictional Acme Connect Gateway), manufacturer-side filings (what wolfSSL Inc. itself ships under CRA — classification, conformity assessment, declaration of conformity template, EU AR status, etc.), and helper scripts (validate.sh runs without building wolfSSL, with optional cyclonedx-cli / pyspdxtools schema validation). Regenerating component SBOMs requires a wolfSSL tree with SBOM support — see cra-kit/README.md.

Please see the cra-kit/README.md for further usage and details.


uefi-library (wolfCrypt UEFI boot module and test app)

This directory contains a UEFI wolfCrypt protocol driver (libwolfcrypt.efi) and a companion test application (test.efi). Examples run on qemu.

Please see the uefi-library/README.md for further usage and details.


Notes

When necessary, examples will use the example certificates and keys located in the ./certs directory. These certificates and keys have been pulled in from the main wolfSSL repository.

To generate your own cert text, see the DER to C script.


Support

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