I tried CST 4.0 but it did not work, it seems to fail to load the PKCS11 module (x64).
khayashida@US01LPT12909 MINGW64 /c/cst
$ export PKCS11_MODULE_PATH=C:\\Program\ Files\\SafeNet\\LunaClient\\cryptoki.dll
khayashida@US01LPT12909 MINGW64 /c/cst
$ export PKCS11_PIN=********
khayashida@US01LPT12909 MINGW64 /c/cst
$ gdb ./mingw64/bin/cst.exe
GNU gdb (GDB) 15.1
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./mingw64/bin/cst.exe...
(gdb) r -b pkcs11 --verbose -o u-boot_csf.bin -i u-boot.csf
Starting program: C:\cst\mingw64\bin\cst.exe -b pkcs11 --verbose -o u-boot_csf.bin -i u-boot.csf
[New Thread 21416.0x72d8]
[New Thread 21416.0x6878]
[New Thread 21416.0x1f58]
Install SRK
Install no CAK
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ff743fe30bf in bind_engine ()I was hoping to build cst.exe and get a stack trace, but could not build it because I could not run docker on mingw64.
khayashida@US01LPT12909 MINGW64 /c/cst/src
$ ƒdocker run -it -v $(pwd):/home/$USER/cst cst:build /bin/bash C:\Program Files\Docker\Docker\resources\bin\docker.exe: Error response from daemon: Mount denied:
The source path "C:/cst/src;C"
doesn't exist and is not known to Docker.
See 'C:\Program Files\Docker\Docker\resources\bin\docker.exe run --help'.
The HSM used is the Luna HSM. You can download it from here, but you need an account to access it. Sharing the client from us may have a licensing issue.
https://thalesdocs.com/gphsm/luna/7/docs/network/Content/CRN/Luna/client/10-7-2.htm
It also generates the segmentation error for YubiKey FIPS 5. The PKCS11 module for YubiKey can be downloaded here.
https://developers.yubico.com/yubico-piv-tool/Releases/
If you do not have these HSMs, you can still try the PKCS11 modules to see if it crashes in the bind_engine function. If it can load YubiKey modules, I would expect it to be able to load Luna HSM modules as well.