-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
github-actions[bot] edited this page Jun 11, 2026
·
2 revisions
wolfSPDM depends on wolfSSL/wolfCrypt with SPDM-required algorithms enabled.
Minimum validated wolfSSL version: v5.8.0-stable.
Example wolfSSL build:
git clone https://github.com/wolfSSL/wolfssl.git
cd wolfssl
./autogen.sh
./configure --enable-wolftpm --enable-ecc --enable-sha384 \
--enable-aesgcm --enable-hkdf --enable-sp
make
sudo make install
sudo ldconfigFor optional post-quantum ML-DSA support, add --enable-mldsa and use
wolfSSL master (or a release that ships the wc_MlDsaKey context API). See
Post-Quantum ML-DSA.
./autogen.sh
./configure --with-wolfssl=/usr/local
make
make check| Option | Description |
|---|---|
--with-wolfssl=PATH |
Path to wolfSSL headers/libs |
--enable-debug |
Enables debug build flags and WOLFSPDM_DEBUG
|
--enable-dynamic-mem |
Enables heap-allocated context APIs (wolfSPDM_New) |
--disable-mldsa |
Forces ML-DSA off (default auto-follows wolfSSL) |
Zero-malloc operation with caller-managed context memory:
byte spdmBuf[WOLFSPDM_CTX_STATIC_SIZE];
WOLFSPDM_CTX* ctx = (WOLFSPDM_CTX*)spdmBuf;
wolfSPDM_InitStatic(ctx, sizeof(spdmBuf));WOLFSPDM_CTX_STATIC_SIZE is 32768 bytes.
Enable with --enable-dynamic-mem, then:
WOLFSPDM_CTX* ctx = wolfSPDM_New();- Initialize context (
wolfSPDM_InitorwolfSPDM_InitStatic) - Register transport callback with
wolfSPDM_SetIO - Optionally set trust root with
wolfSPDM_SetTrustedCAs - Establish session with
wolfSPDM_Connect - Exchange secured data using
wolfSPDM_SecuredExchange(or send/receive helpers) - End session with
wolfSPDM_Disconnect - Cleanup via
wolfSPDM_Free
All transport is caller-owned through:
typedef int (*WOLFSPDM_IO_CB)(WOLFSPDM_CTX* ctx,
const byte* txBuf, word32 txSz,
byte* rxBuf, word32* rxSz,
void* userCtx);The callback sends raw SPDM/SPDM-secured records and returns the responder message.