I am running Ubuntu 22.04, and my computer features TPMv2. I want to use TPM to store secrets (like web-server pvt key), or, at least, use it as a random numbers generator.
I have the following packages installed:tpm-udev tpm2-openssl tpm2-tools tpm-udev
The tpm2 tools apparently can communicate with the TPM chip:
$ tpm2 getrandom -T device:/dev/tpmrm0 8 | hexdump0000000 2bda a07c d91c da8f
However, OpenSSL v3.0.2 does not recognise the TPM engine:
(rdrand) Intel RDRAND engine(dynamic) Dynamic engine loading support
So, the question is: how can I make OpenSSL recognize a TPM2 and use it as an engine?