Prerequisites summary
| Component | Build tool | Key dependencies |
|---|---|---|
| hls-hsm | CMake 3.20+, g++ C++17 | None |
| pkcs11-daemon | CMake, g++ C++17 | OpenSSL, SQLite3 |
| liboqs_test | CMake, gcc | liboqs |
| hsm_test.c | gcc | libsofthsm2, dl |
hls-hsm
The core HSM simulation library. No third-party dependencies. Requirements: CMake 3.20+, g++ with C++17 support.pkcs11-daemon
The PKCS#11 daemon with RSA key generation, SQLite-backed vault, and SD card import support. Requirements: CMake, g++ with C++17 support, OpenSSL development headers, SQLite3 development headers.liboqs-dev is optional and required only for post-quantum support.
Install system dependencies
PQC support is currently a stub.
Crypto::pqc_generate() always returns an empty string regardless of whether liboqs is installed. Installing liboqs-dev is not required for the build to succeed.liboqs_test
A standalone test binary that exercises theliboqs post-quantum cryptography library.
Requirements: CMake, gcc, liboqs-dev.
hsm_test.c
A C program that exercises PKCS#11 functions against a SoftHSM2 token by loading the shared library at runtime withdlopen/dlsym.
Requirements: gcc, libsofthsm2-dev.
Initialize a SoftHSM2 token (first run only)
--show-slots. You will need it to configure hsm_test.c or pass it at runtime.Common build errors
CMake version too old
CMake version too old
OpenSSL headers not found (pkcs11-daemon)
OpenSSL headers not found (pkcs11-daemon)
Error:Fix:
SQLite3 headers not found (pkcs11-daemon)
SQLite3 headers not found (pkcs11-daemon)
Error:Fix:
liboqs not found (liboqs_test)
liboqs not found (liboqs_test)
Error:Fix:If
liboqs-dev is not available in your package manager, build from source:libsofthsm2 or dl not found (hsm_test.c)
libsofthsm2 or dl not found (hsm_test.c)
Error:Fix:
C++17 not supported
C++17 not supported
Error:or similar C++17 feature errors.Fix: Ensure you are using g++ 7 or later: