rofavama/SoftHSMv2 ? reverse-engineered prompt
Reverse engineered prompt
Build me a software HSM that works like a PKCS#11 token, so I can use it in place of a physical hardware security module for testing and development.
It should let me create and manage tokens, generate and store keys securely, and expose a PKCS#11 module that other apps can talk to. I want a simple utility to initialize a token, set the security officer PIN and user PIN, and then keep token data on disk in a config driven location so backups are just regular file copies. Please include support for using either OpenSSL or Botan as the crypto backend, and make sure the project can be built from source with the usual configure and make flow. If there are optional features for ECC or other modern key types, keep them working when available. Also include a basic test suite and clear instructions for setting up the config file and token directory. If you need to, look up the current docs for PKCS#11 or the crypto libraries online.
Are you gonna build this?
make sure you review the code using coderabbit