tpm2-software / tpm2-tss-engine

OpenSSL Engine for TPM2 devices
https://tpm2-software.github.io
BSD 3-Clause "New" or "Revised" License
150 stars 100 forks source link

What if tpm2-tss was configured with "--disable-tcti-mssim" #151

Closed jhealyt closed 4 years ago

jhealyt commented 4 years ago

I haven't been able to confirm this is a problem for everyone (because I'm using my own Makefile), however I'll share my experience anyway:

It seems as though the key generator program "tpm2tss-genkey" depends upon the file "libtss2-tcti-mssim.so", however this file won't exist if tpm2-tss was configured with "--disable-tcti-mssim".

AndreasFuchsTPM commented 4 years ago

I wonder if the -ltss2-tcti-mssim -ltss2-tcti-device in the Makefile are actually needed anymore, since this is handled by tpm2-tss-engine-tcti.c anyways. Might just work without.

Also we really need to switch to libtss2-tctildr asap... :-(

jhealyt commented 4 years ago

I've looked through the code to try figure this out before asking you. . .

. . . . but what is "tctildr" actually use for? I notice that I have another library file "/usr/lib/libtss2-tctildr.so"

Is it some sort of dynamic loader of other TCTI's ?

AndreasFuchsTPM commented 4 years ago

Exactly

diabonas commented 4 years ago

I wonder if the -ltss2-tcti-mssim -ltss2-tcti-device in the Makefile are actually needed anymore, since this is handled by tpm2-tss-engine-tcti.c anyways. Might just work without.

These shouldn't be necessary, the TCTI libraries are dlopen()'ed, so they don't need to be linked. I can have a look a porting the code to tss2-tctildr, shouldn't be much more that removing tpm2-tss-engine-tcti.c and replacing the custom tcti_ functions in tpm2-tss-engine.c by their tctildr equivalents.