Demonstrates a DTLS client using wolfHSM for cryptographic operations. All private key operations are performed on the HSM - keys never leave the secure environment. The example uses wolfHSM posix server for HSM communication/simulation.
make download_repos # Clone repos (first time only)
make all # Build everythingTerminal 1 - Start wolfHSM posix server:
make run_hsm_serverTerminal 2 - Start DTLS server:
make run_dtls_serverTerminal 3 - Run client:
make run_clientmake WOLFSSL_DIR=/path/to/wolfssl WOLFHSM_DIR=/path/to/wolfhsm all+------------------+ TCP +------------------+
| DTLS Client |<------------>| wolfHSM Server |
| | | (crypto ops) |
+--------+---------+ +------------------+
| UDP/DTLS
v
+------------------+
| DTLS Server |
| (application) |
+------------------+
| Target | Description |
|---|---|
download_repos |
Clone wolfSSL and wolfHSM |
all |
Build everything (default) |
run_hsm_server |
Start wolfHSM server (Terminal 1) |
run_dtls_server |
Start wolfSSL DTLS server (Terminal 2) |
run_client |
Run the DTLS client (Terminal 3) |
clean |
Clean build artifacts |
clean_repos |
Remove cloned repositories |
make clean
make DEBUG=1